Skip to main content

Posts

Showing posts from January, 2017

Jenkins - Git branch fallback with Git Chooser Alternative Plugin

If you need to have a fallback for your git branch selection in Jenkins, for example in case you're selecting branch for top project which has more subprojects. You can use Git Chooser Alternative Plugin. After installing it in Jenkins, you have to setup your Source Code Management section as follows:
Add two (or more) branches in to section "Branches to build". In example below, I'm using placeholders "primaryBranch" as a primary branch and "branch" as fallback one.
Then set strategy as "Alternative" and you're done!