Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
Description
In multibranch jobs, if you 'replay' a build it will reuse the git commit (and assume svn revision etc) of the build in the replay.
But with non-multibranch pipeline jobs, the latest commit is always used no matter what build is replayed.
It may have something to do with 'checkout scm' vs 'git url:' being used, but either way I think it should work in the same.
Attachments
Issue Links
- is duplicated by
-
JENKINS-45808 "checkout scm" should give the same guarantees on standalone pipeline jobs as on multibranch jobs
-
- Resolved
-
Is this why, when I Replay a given build of a given multi-branch pipeline job, the Jenkinsfile is checked out at the commit build I'm Replaying was at, however a checkout in the pipeline job does not get the same commit? Is it because the scm.branches doesn't point at the commit of the Replay but rather points at the branch?
If so, this is pretty horrible. Shouldn't one be able to depend on the global scm variable containing an accurate representation of what is being checked out (implicitly)? Why does the implicit checkout get the right commit and yet an explicit checkout doesn't?