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

Git plugin , stash pull request

    XMLWordPrintable

Details

    Description

      I'm using pull request notification from stash , After upgrading the jenkins git plugin to latest version this part of configuration , doesn't work anymore:

       

      now is taking the ${PULL_REQUEST_TO_BRANCH} variable literally , is not replaced for the name's branch to merge. It was working with git plugin 3.0.1 version , after upgraded it , it doesnt work.  

      jenkins log:

       
      Merging Revision 1bcff39a1e0803df273897b13bda222e3c8d30b7 (origin/devops-config-files) to origin/$PULL_REQUEST_TO_BRANCH, UserMergeOptions{mergeRemote='origin', mergeTarget='$PULL_REQUEST_TO_BRANCH', mergeStrategy='default', fastForwardMode='--ff'}
      > git rev-parse "origin/$PULL_REQUEST_TO_BRANCH^{commit}" # timeout=10
      FATAL: Command "git rev-parse "origin/$PULL_REQUEST_TO_BRANCH^{commit}"" returned status code 128:
       

      before upgrading it was working

       
      Merging Revision 3a20f51209059e8044303292a813f1aacffcfd21 (origin/Fixgradle) to origin/secondary_branch, UserMergeOptions{mergeRemote='origin', mergeTarget='$PULL_REQUEST_TO_BRANCH', mergeStrategy='default', fastForwardMode='--ff'}
      > git rev-parse origin/secondary_branch^{commit} # timeout=10

      Attachments

        Activity

          roquesao Roque M created issue -
          roquesao Roque M made changes -
          Field Original Value New Value
          Description I'm using pull request notificacion from stash , After upgrading the jenkins git plugin to latest version this part of configuration , doesn't work anymore:

           

          !image-2017-07-18-16-21-20-718.png!

          now is taking the $\{PULL_REQUEST_TO_BRANCH} variable literally , is not replaced for the name's branch to merge. It was working with git plugin 3.0.1 version , after upgraded it , it doesnt work.  

          jenkins log:

           
          Merging Revision 1bcff39a1e0803df273897b13bda222e3c8d30b7 (origin/devops-config-files) to origin/$PULL_REQUEST_TO_BRANCH, UserMergeOptions\{mergeRemote='origin', mergeTarget='$PULL_REQUEST_TO_BRANCH', mergeStrategy='default', fastForwardMode='--ff'}
           > git rev-parse "origin/$PULL_REQUEST_TO_BRANCH^\{commit}" # timeout=10
          FATAL: Command "git rev-parse "origin/$PULL_REQUEST_TO_BRANCH^\{commit}"" returned status code 128:
           

          before upgrading it was working

           
          Merging Revision 3a20f51209059e8044303292a813f1aacffcfd21 (origin/Fixgradle) to origin/secondary_branch, UserMergeOptions\{mergeRemote='origin', mergeTarget='$PULL_REQUEST_TO_BRANCH', mergeStrategy='default', fastForwardMode='--ff'}
          > git rev-parse origin/secondary_branch^\{commit} # timeout=10
          I'm using pull request notification from stash , After upgrading the jenkins git plugin to latest version this part of configuration , doesn't work anymore:

           

          !image-2017-07-18-16-21-20-718.png!

          now is taking the $\{PULL_REQUEST_TO_BRANCH} variable literally , is not replaced for the name's branch to merge. It was working with git plugin 3.0.1 version , after upgraded it , it doesnt work.  

          jenkins log:

           
           Merging Revision 1bcff39a1e0803df273897b13bda222e3c8d30b7 (origin/devops-config-files) to origin/$PULL_REQUEST_TO_BRANCH, UserMergeOptions\{mergeRemote='origin', mergeTarget='$PULL_REQUEST_TO_BRANCH', mergeStrategy='default', fastForwardMode='--ff'}
           > git rev-parse "origin/$PULL_REQUEST_TO_BRANCH^\{commit}" # timeout=10
           FATAL: Command "git rev-parse "origin/$PULL_REQUEST_TO_BRANCH^\{commit}"" returned status code 128:
            

          before upgrading it was working

           
           Merging Revision 3a20f51209059e8044303292a813f1aacffcfd21 (origin/Fixgradle) to origin/secondary_branch, UserMergeOptions\{mergeRemote='origin', mergeTarget='$PULL_REQUEST_TO_BRANCH', mergeStrategy='default', fastForwardMode='--ff'}
           > git rev-parse origin/secondary_branch^\{commit} # timeout=10
          markewaite Mark Waite made changes -
          Assignee Mark Waite [ markewaite ]
          markewaite Mark Waite added a comment - - edited

          I'm not aware of any change between 3.0.1 and 3.4.0 which would prevent expansion of that variable. The 3.0.1 release already included the fixes from the 11 May 2016 security advisory, though the keepUndefinedParameters work around seems very similar to this condition.

          Did you possibly change the command line arguments used to start Jenkins? If so, did you lose a keepUndefinedParameters or the other work around for that security issue?

          markewaite Mark Waite added a comment - - edited I'm not aware of any change between 3.0.1 and 3.4.0 which would prevent expansion of that variable. The 3.0.1 release already included the fixes from the 11 May 2016 security advisory , though the keepUndefinedParameters work around seems very similar to this condition. Did you possibly change the command line arguments used to start Jenkins? If so, did you lose a keepUndefinedParameters or the other work around for that security issue?
          markewaite Mark Waite added a comment -

          roquesao did you find the root cause of the change in behavior in your system?

          Was it a change of command line arguments from before the upgrade to after the upgrade?

          markewaite Mark Waite added a comment - roquesao did you find the root cause of the change in behavior in your system? Was it a change of command line arguments from before the upgrade to after the upgrade?
          markewaite Mark Waite added a comment -

          Resolving after a month with no response to my question.

          markewaite Mark Waite added a comment - Resolving after a month with no response to my question.
          markewaite Mark Waite made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Open [ 1 ] Resolved [ 5 ]
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

            Unassigned Unassigned
            roquesao Roque M
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: