-
Task
-
Resolution: Won't Fix
-
Major
I have provided branch specifiers as shown in the attached image. If I remove the branch specifier with $BRANCH in it, job works perfectly(gets triggered) as anyone commits to develop or feature branches.
Now I also want that same job should also be able to build the project on any specific branch of choice. So I added a branch specifier and put $BRANCH in it. I have defined BRANCH as a string parameter and the user can give branch value as input when triggering the job manually.
But in this scenario even if the user gives a "bugfix112" job is still building develop branch. Or if earlier poll action had built the job on feature branch than even after providing user-input, the job will still build feature branch.
It seems like manual input has no effect. How can I configure a Jenkins job that can be triggered on poll SCM and also with user input for the branch parameter?
I also tried giving /$BRANCH,/${BRANCH} but no success.
Jenkins multibranch pipeline and organization folders provide a much better way of defining jobs and managing them with multiple branches. When a single job changes from one branch to another, the history of the job is hard to read, the user interface is hard to understand, and the user is easily confused by the result.
Multibranch pipelines place the job definition inside the branch and automatically create and delete jobs as branches are created and deleted. History is retained for a single branch and is easy to understand.