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
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