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

Pipeline Job Cannot Checkout Git Tag

XMLWordPrintable

      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)

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

              Created:
              Updated:
              Resolved: