-
New Feature
-
Resolution: Unresolved
-
Major
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.
- is duplicated by
-
JENKINS-45808 "checkout scm" should give the same guarantees on standalone pipeline jobs as on multibranch jobs
-
- Resolved
-
Replay is actually not the central issue. scm for a CpsScmFlowDefinition is not guaranteed to match the commit of Jenkinsfile. This is because it is using hudson.model.SCM, i.e., the old core APIs, which do not support checking out a specific version. In order to fix this we would have to actually deprecate CpsScmFlowDefinition and provide a replacement using scm-api so it would behave more like multibranch, except of course for a predefined branch.