Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61074

Allow Git plugin to give variable branch specifiers along with other hardcoded branch specifiers.

XMLWordPrintable

      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.

       

        1. issue.png
          36 kB
          Akashdeep Thakur

            Unassigned Unassigned
            thinkingmonster Akashdeep Thakur
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: