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

checkout(scm) step can return wrong variables when used following another Git checkout

    XMLWordPrintable

Details

    • git plugin 4.7.0 released 17 Mar 2021

    Description

      This looks like the same type of code-path issue described in https://issues.jenkins-ci.org/browse/JENKINS-41996 

       

      @Library('someGitLibrary')
      
      node {
        final scmVars = checkout(scm)
        // scmVars may have Git data from either the someGitLibrary or the scmVars
       }

       

      Looks like its caused by https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitSCM.java#L1282-L1317 

       

      Attachments

        Issue Links

          Activity

            mkobit Mike Kobit created issue -
            mkobit Mike Kobit made changes -
            Field Original Value New Value
            Description This looks like the same type of code-path issue described in https://issues.jenkins-ci.org/browse/JENKINS-41996 

             
            {code:java}
            @Library('someGitLibrary')

            node {
              final scmVars = checkout(scm)
              // scmVars may have Git data from either the
            }{code}
             

            Looks like its caused by [https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitSCM.java#L1282-L1317

             
            This looks like the same type of code-path issue described in https://issues.jenkins-ci.org/browse/JENKINS-41996 

             
            {code:java}
            @Library('someGitLibrary')

            node {
              final scmVars = checkout(scm)
              // scmVars may have Git data from either the someGitLibrary or the scmVars
             }{code}
             

            Looks like its caused by [https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitSCM.java#L1282-L1317

             
            markewaite Mark Waite made changes -
            Component/s scm-api-plugin [ 18054 ]
            Component/s git-plugin [ 15543 ]
            markewaite Mark Waite made changes -
            Assignee Mark Waite [ markewaite ]
            kakapo4 Mark Wright made changes -
            Summary checkout(scm) step can return wrong variables when used with a global library that is pulled from Git checkout(scm) step can return wrong variables when used following another Git checkout
            kakapo4 Mark Wright made changes -
            Link This issue is blocked by JENKINS-52378 [ JENKINS-52378 ]
            markewaite Mark Waite made changes -
            Link This issue duplicates JENKINS-53346 [ JENKINS-53346 ]
            markewaite Mark Waite made changes -
            Released As git plugin 4.7.0 released 17 Mar 2021
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Closed [ 6 ]

            People

              Unassigned Unassigned
              mkobit Mike Kobit
              Votes:
              9 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: