Select checkout branch dependent on a build parameter

8 views
Skip to first unread message

Christian

unread,
Sep 28, 2017, 8:51:09 AM9/28/17
to Jenkins Users
Hello,

I have a question. I need to select the branch to checkout dependent on a build parameter. And the branch name does not equal the parameters. If the parameter equals foo1 I need to checkout branch origin/bar1 and for foo2 origin/bar2. Is that possible? 

I could only get that far that I can checkout different branches when using the build parameter directly (origin/{$build_param}). I thought about setting a variable with the EnvInject Plugin, but it seems that the checkout step cannot access these variables, or am i missing something there?

It is a maven build, no pipeline

thank you and best regards,
Christian
Reply all
Reply to author
Forward
0 new messages