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.

Any help greatly appreciated, thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c1dd2a06-26b4-4b4d-9bde-95e8b2d5589e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to