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.