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

specified git branch to checkout/build is not used

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None

      Failure
      specified git branch to checkout/build is not used

      Reproducible by

      • a defined job including text parameter “GIT_BRANCH_NAME” (textParameter_GIT_BRANCH_NAME.png)
      • use git as source code management
      • check out to specific local branch
      • provide an existing remote branch (other than remote master) is provided as parameter
        • remote master branch is check out and build

      Expected behavior

      • branch provided by text parameter “GIT_BRANCH_NAME” is checked out and build

      Details

      • Jenkins ver. 1.554.2
      • Ubuntu precise (12.04.2 LTS)

          [JENKINS-23714] specified git branch to checkout/build is not used

          Lothar Schulz created issue -
          Lothar Schulz made changes -
          Link New: This issue is related to JENKINS-21719 [ JENKINS-21719 ]
          Lothar Schulz made changes -
          Link New: This issue is related to JENKINS-20969 [ JENKINS-20969 ]

          Jesse Glick added a comment -

          Misfiled.

          Jesse Glick added a comment - Misfiled.
          Jesse Glick made changes -
          Component/s New: git-plugin [ 15543 ]
          Component/s Original: scm-api-plugin [ 18054 ]
          Assignee New: Mark Waite [ markewaite ]
          Labels Original: git
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]

          Mark Waite added a comment - - edited

          Steps I used while attempting to duplicate this bug report with git plugin 2.4.0 and git client plugin 1.19.0 :

          1. Create a multi-configuration Jenkins job "JENKINS-23714-parameterized-branch-name-ignored" using elastic axis and the axis definition "linux || freebsd" (selects 13 different Unix-like configurations in my test environment) - free style project and a single node has the same behavior
          2. Add a parameter GIT_BRANCH_NAME to that job, default value master
          3. Use git as the SCM for the job
          4. Configure repository as git://github.com/MarkEWaite/git-client-plugin.git
          5. Configure "Branches to build" as `origin/${GIT_BRANCH_NAME}`
          6. Add $GIT_BRANCH_NAME as "Additional Behaviours" "Checkout to specific local branch"
          7. Add an XShell (or shell) build step git branch
          8. Add an XShell (or shell) build step git log -n 1

          When I run that job with the parameter value "master-pom-formatter", it correctly performs the checkout of the origin/master-pom-formatter branch and uses a local branch named master-pom-formatter. The same for other branches.

          Since the original submitter did not include a plugin version number which shows the problem, and I can't see it on the most recent release of the plugins, I'm marking this as resolved.

          Mark Waite added a comment - - edited Steps I used while attempting to duplicate this bug report with git plugin 2.4.0 and git client plugin 1.19.0 : Create a multi-configuration Jenkins job " JENKINS-23714 -parameterized-branch-name-ignored" using elastic axis and the axis definition "linux || freebsd" (selects 13 different Unix-like configurations in my test environment) - free style project and a single node has the same behavior Add a parameter GIT_BRANCH_NAME to that job, default value master Use git as the SCM for the job Configure repository as git://github.com/MarkEWaite/git-client-plugin.git Configure "Branches to build" as `origin/${GIT_BRANCH_NAME}` Add $GIT_BRANCH_NAME as "Additional Behaviours" "Checkout to specific local branch" Add an XShell (or shell) build step git branch Add an XShell (or shell) build step git log -n 1 When I run that job with the parameter value "master-pom-formatter", it correctly performs the checkout of the origin/master-pom-formatter branch and uses a local branch named master-pom-formatter. The same for other branches. Since the original submitter did not include a plugin version number which shows the problem, and I can't see it on the most recent release of the plugins, I'm marking this as resolved.
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 156500 ] New: JNJira + In-Review [ 195445 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            Unassigned Unassigned
            lschulzalando14 Lothar Schulz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: