For Techs.... Techniques.... Technologies....


How to pass branch name as parameter in Jenkins job

Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat.

In some cases we need to build specific branches of repository.

This can be achieved by adding new string parameter in existing job. Then in Source Code Management section update Branches to build to use string parameter defined. This will allow Jenkins job to use default branch as master and for manual builds it will ask you to enter branch details (FYI: by default it's set to master).

Leave a Reply