Hello Eldad,
We have something like this working on our multibranch pipelines:
hudson.model.Cause.UserIdCause userIdCause = (hudson.model.Cause.UserIdCause
) pipeline.currentBuild.getCause(hudson.model.Cause.UserIdCause.class)
if(userIdCause) {
String userName = userIdCause.getUserName()
String userId = userIdCause.getUserId()
}
Bear in mind that script security may block it when trying to run it.
El lunes, 14 de enero de 2019, 21:33:12 (UTC+1), Eldad Cohen escribió:
>
> Hi,
>
> wrap([$class: 'BuildUser']) {
> echo "${BUILD_USER}"
> }
>
> Is it possible with MultiBranch PipeLine ? Got No such property ?
>
> I just want info what triggered the build ? who did commit ?
>
> Thanks
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/2ce06380-9f08-4e62-a795-a51de8a0f75b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.