I have upstream and downstream pipelines and in downstream pipeline, I want 
to store user, who started upstream build, in downstream build variable.

I used following in downstream pipeline but it results into error - 
`java.lang.NullPointerException: Cannot invoke method getUserId() on null 
object`

    Owner = currentBuild.rawBuild.getCause(Cause.UserIdCause).getUserId()

One way is to store it in a variable in upstream pipeline and pass it as 
param to downstream pipeline but that is additional handling and 
considering my parameters list, it is little tricky.

Is there any way I can get user who started upstream build in downstream 
build without passing parameter?

Similarly, `JOB_NAME` and `BUILD_NUMBER` of upstream to downstream.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f4704e0d-5958-4075-bd00-e5666f2a127fo%40googlegroups.com.

Reply via email to