Resolving Promoted Build Parameter in Evaluated Groovy Script

14 views
Skip to first unread message

Steve Holmes

unread,
Feb 25, 2016, 6:37:14 AM2/25/16
to Jenkins Users

I have a job which I want to run against promoted builds only, so I select the required build using Promoted Build Parameter and assign a variable name (e.g. PromotedBuild), which I believe gives me access to the promoted build’s url. I then want to manipulate the url within Build Environment/Evaluated Groovy script to extract the upstream build name and job number, but it doesn’t resolve the variable. If I hardcode the url then everything else works fine.

 

(I’m running Jenkins 1.580.2 with Promoted Builds Plugin v 2.24.1 (I tried 2.25 but it crashed my install) and Environment Injector Plugin 1.91.1)


Thanks,


Steve

Reply all
Reply to author
Forward
0 new messages