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

Replay does not reuse commit on non-multibranch pipeline jobs

    Details

    • Similar Issues:

      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

            Activity

            Hide
            jglick 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.

            Show
            jglick 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.
            Hide
            jamesdumay James Dumay added a comment -

            Jesse Glick 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.

            Show
            jamesdumay James Dumay added a comment - Jesse Glick 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.
            Hide
            0x89 Martin Sander added a comment -

            See JENKINS-45808 for suggested workarounds.

            Show
            0x89 Martin Sander added a comment - See JENKINS-45808 for suggested workarounds.

              People

              • Assignee:
                Unassigned
                Reporter:
                imeredith Ivan Meredith
              • Votes:
                5 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: