You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
Hi,
I think I have a simple question but I am new to Jenkins so I'm not sure how best to solve it.
I have two parameters to my build (ghprbSourceBranch and ghprbActualCommit) one of which I want to use to name my build so I have the branch name in the build name, and one I use to select the actual commit to build. This works fine when called from the pull request builder. However I also want to be able to build the same job manually (Build With Parameters). I don't want to have to specify both parameters as this is error prone The end result of this is that I want to be able to name my job:
if ($ghprbSourceBranch != "") Build Name = job-${ghprbSourceBranch} else Build Name = job-${ghprbActualCommit}
Is there a way to do this? I tired setting Build Name with POSIX shell substitution - ${ghprbSourceBranch:-$ghprbActualCommit} - but it didn't work.