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

    Details

    • Similar Issues:

      Description

      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.

       

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          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.

          Show
          markewaite Mark Waite added a comment - 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.

            People

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

              Dates

              Created:
              Updated:
              Resolved: