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

Pipeline Job Cannot Checkout Git Tag

    Details

    • Similar Issues:

      Description

      I created a Pipeline project to build a Git project based on it's tag.

      node

      { git branch: 'refs/tags/VMAccess-1.4.1.0', url: 'https://github.com/azure/azure-linux-extensions' }

      The console output contains the following data.

      > git rev-parse refs/remotes/origin/refs/tags/VMAccess-1.4.1.0^

      {commit} # timeout=10
      > git rev-parse refs/remotes/origin/origin/refs/tags/VMAccess-1.4.1.0^{commit}

      # timeout=10
      > git rev-parse origin/refs/tags/VMAccess-1.4.1.0^

      {commit} # timeout=10

      The correct rev-parse should be refs/tags/VMAccess-1.4.1.0, but that value is never tried by the plugin. (The value refs/remotes/origin/refs/tags/VMAccess-1.4.1.0 may also be valid.) I tried to influence the refspec, but setting the refspec key in the git command, but this had no effect.

      I create a Freestyle project, and set the branch to refs/tags/VMAccess-1.4.1.0. The project built successfully.

      The console output contains the following data.

      > git rev-parse refs/tags/VMAccess-1.4.1.0^{commit}

      # timeout=10
      > git rev-parse refs/remotes/origin/refs/tags/VMAccess-1.4.1.0^

      {commit}

      # timeout=10
      Checking out Revision 97fb7b019946ef71f15e73881b761e4ba1933781 (refs/tags/VMAccess-1.4.1.0)

        Attachments

          Issue Links

            Activity

            boumenot Christopher Boumenot created issue -
            boumenot Christopher Boumenot made changes -
            Field Original Value New Value
            Description I created a Pipeline project to build a Git project based on it's tag.

            node {
                git branch: 'refs/tags/VMAccess-1.4.1.0', url: 'https://github.com/azure/azure-linux-extensions'
            }

            The console output contains the following data.

             > git rev-parse refs/remotes/origin/refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10
             > git rev-parse refs/remotes/origin/origin/refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10
             > git rev-parse origin/refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10

            The correct rev-parse should be refs/tags/VMAccess-1.4.1.0, but that value is never tried by the plugin. (The value refs/remotes/origin/refs/tags/VMAccess-1.4.1.0 may also be valid.) I tried to influence the refspec, but setting the refspec key in the git command, but this had no effect.

            I create a Freestyle project, and set the branch to refs/tags/VMAccess-1.4.1.0. The project build successfully.

            The console output contains the following data.

             > git rev-parse refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10
             > git rev-parse refs/remotes/origin/refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10
            Checking out Revision 97fb7b019946ef71f15e73881b761e4ba1933781 (refs/tags/VMAccess-1.4.1.0)

            I created a Pipeline project to build a Git project based on it's tag.

            node {
                git branch: 'refs/tags/VMAccess-1.4.1.0', url: 'https://github.com/azure/azure-linux-extensions'
            }

            The console output contains the following data.

             > git rev-parse refs/remotes/origin/refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10
             > git rev-parse refs/remotes/origin/origin/refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10
             > git rev-parse origin/refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10

            The correct rev-parse should be refs/tags/VMAccess-1.4.1.0, but that value is never tried by the plugin. (The value refs/remotes/origin/refs/tags/VMAccess-1.4.1.0 may also be valid.) I tried to influence the refspec, but setting the refspec key in the git command, but this had no effect.

            I create a Freestyle project, and set the branch to refs/tags/VMAccess-1.4.1.0. The project built successfully.

            The console output contains the following data.

             > git rev-parse refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10
             > git rev-parse refs/remotes/origin/refs/tags/VMAccess-1.4.1.0^{commit} # timeout=10
            Checking out Revision 97fb7b019946ef71f15e73881b761e4ba1933781 (refs/tags/VMAccess-1.4.1.0)

            markewaite Mark Waite made changes -
            Assignee Mark Waite [ markewaite ]
            brad103 Brad M made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            abayer Andrew Bayer made changes -
            Labels git pipeline tags workflow git pipeline tags
            michaelneale Michael Neale made changes -
            Remote Link This issue links to "cb details (Web Link)" [ 17305 ]
            michaelneale Michael Neale made changes -
            Labels git pipeline tags cloudbees-internal-pipeline git pipeline tags
            michaelneale Michael Neale made changes -
            Component/s pipeline [ 21692 ]
            michaelneale Michael Neale made changes -
            Link This issue relates to JENKINS-34395 [ JENKINS-34395 ]
            michaelneale Michael Neale made changes -
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            stephenconnolly Stephen Connolly made changes -
            Link This issue duplicates JENKINS-46207 [ JENKINS-46207 ]
            stephenconnolly Stephen Connolly made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Duplicate [ 3 ]
            tomasbjerre Tomas Bjerre made changes -
            Assignee Tomas Bjerre [ tomasbjerre ]
            tomasbjerre Tomas Bjerre made changes -
            Assignee Tomas Bjerre [ tomasbjerre ] Mark Waite [ markewaite ]
            tomasbjerre Tomas Bjerre made changes -
            Assignee Mark Waite [ markewaite ]
            plabedan Paul Labedan made changes -
            Resolution Duplicate [ 3 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            markewaite Mark Waite made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Not A Defect [ 7 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                boumenot Christopher Boumenot
              • Votes:
                9 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: