Using GitHub Branch Names With Forward Slashes and Jenkins Together

Jenkins Feature

One of my pet peeves with Jenkins existed around the use of forward slashes in our branch names on Virtual World Framework.  While the forward slash “/” was accepted by GitHub (ie. branch/branch-name) as an acceptable character, Jenkins would blow up when trying to pull from this branch name structure.

The solution for using forward-slashes branch names in Jenkins was incredible easy however. You simply need to add origin/ to the beginning of your branch name when filling in the “branches to build” Branch Specifier.

Thus:

origin/branch/branch-name 

allows Jenkins to poll and pull changes specific to a branch with a forward slash in its name.  Simple!

Leave a Reply