-
Bug
-
Resolution: Fixed
-
Major
-
None
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.
- depends on
-
JENKINS-58450 CHANGE_FORK doesn't point to the user/repo when the fork name differs from the upstream name
-
- Resolved
-
- is blocked by
-
JENKINS-63598 Failure to check out commit that is not an ancestor of master
-
- Open
-
- is blocking
-
JENKINS-47498 Select compatible plugin versions using a BOM
-
- Resolved
-
- links to
I am not so sure. git remote -v in a forked PR build shows https://github.com/jenkinsci/XXX-plugin.git. This is because Jenkins first clones the origin repo at master, then merges in the PR head.
As to the property, I think you want to introduce a property for the entire repository location, so
since a developer’s fork may not have the same name as the origin repository. In particular, if the developer already has some unrelated “sources” repo or fork named foo-plugin, then jenkinsci/foo-plugin will be forked to jqhacker/foo-plugin-1 or similar.
You also would likely want to