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

Failure to check out specified tag for incremental version

      I tried to run the PCT against an incremental release of a plugin, and it failed:

      Created plugin checkout dir : .../pct-work/jsch
      Checking out from SCM connection URL : scm:git:git://github.com/jenkinsci/jsch-plugin.git (jsch-0.1.55.1-rc41.4943eb07c811)
      [INFO] Executing: /bin/sh -c cd '.../pct-work' && 'git' 'clone' 'git://github.com/jenkinsci/jsch-plugin.git' '.../pct-work/jsch'
      [INFO] Working directory: .../pct-work
      [INFO] Executing: /bin/sh -c cd '.../pct-work/jsch' && 'git' 'fetch' 'git://github.com/jenkinsci/jsch-plugin.git'
      [INFO] Working directory: .../pct-work/jsch
      [INFO] Executing: /bin/sh -c cd '.../pct-work/jsch' && 'git' 'checkout' 'jsch-0.1.55.1-rc41.4943eb07c811'
      [INFO] Working directory: .../pct-work/jsch
      Error : The git-checkout command failed. || Cloning into '.../pct-work/jsch'...
      From git://github.com/jenkinsci/jsch-plugin
       * branch            HEAD       -> FETCH_HEAD
      error: pathspec 'jsch-0.1.55.1-rc41.4943eb07c811' did not match any file(s) known to git
      

      That is because this code improperly assumes that ${project.artifactId}-${project.version} is going to be a valid tag. Maven makes no such guarantee. Rather, this code should be looking for a /project/scm/tag and honoring it if present. In this case it would have found

          <tag>4943eb07c81131909f1d3b16bf18dec8a8b91a1b</tag>
      

      which is, in fact, the correct hash to check out.

          [JENKINS-58716] Failure to check out specified tag for incremental version

          Jesse Glick created issue -
          Jesse Glick made changes -
          Epic Link New: JENKINS-50686 [ 189770 ]
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-47498 [ JENKINS-47498 ]
          Basil Crow made changes -
          Remote Link New: This issue links to "PR #181 (Web Link)" [ 23321 ]
          Jesse Glick made changes -
          Component/s New: incrementals-tools [ 23725 ]
          Basil Crow made changes -
          Link New: This issue depends on JENKINS-58450 [ JENKINS-58450 ]
          Jesse Glick made changes -
          Assignee New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "incrementals-tools #16 (Web Link)" [ 25704 ]
          Jesse Glick made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "archetypes #192 (Web Link)" [ 25705 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: