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

Replay does not reuse commit on non-multibranch pipeline jobs

      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.

          [JENKINS-36453] Replay does not reuse commit on non-multibranch pipeline jobs

          Ivan Meredith created issue -
          James Dumay made changes -
          Labels New: blueocean
          Ivan Meredith made changes -
          Description Original: 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 ine same.
          New: 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.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 173161 ] New: JNJira + In-Review [ 184975 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]

          Jesse Glick added a comment -

          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.

          Jesse Glick added a comment - 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.
          Jesse Glick made changes -
          Component/s New: workflow-cps-plugin [ 21713 ]
          Component/s Original: pipeline [ 21692 ]
          Assignee Original: Jesse Glick [ jglick ]
          Issue Type Original: Improvement [ 4 ] New: New Feature [ 2 ]

          James Dumay added a comment -

          jglick great explanation I think we are going to put less emphasis on this job type in the UI in the future so I'd imagine this isn't as high priority as I thought it might be.

          James Dumay added a comment - jglick great explanation I think we are going to put less emphasis on this job type in the UI in the future so I'd imagine this isn't as high priority as I thought it might be.
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-45808 [ JENKINS-45808 ]

            Unassigned Unassigned
            imeredith Ivan Meredith
            Votes:
            8 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: