Re: How to get owner of upstream build in downstream build without using parameter?

2020-08-04 Thread Krish S
You could try this : def owner = currentBuild.getBuildCauses(‘hudson.model.Cause$UserIDCause’) manager.addShortText(“${Approval.userId[0]} ${Approval.userName}”) Thanks, On Tue, Aug 4, 2020 at 2:04 AM Gajanan Mahajan wrote: > I have upstream and downstream pipelines and in downstream

How to get owner of upstream build in downstream build without using parameter?

2020-08-04 Thread Gajanan Mahajan
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