• Pipeline - April 2018

      Use cases

      • Restarting a successful stage so to rollback or redeploy code
      • When long running Pipelines fail intermittently for environmental purposes the developer must be able to restart the execution of the stage that failed within the Pipeline. This allows the developer to recoup time lost running the pipeline to the point of failure.

      In scope

      • Declarative pipeline only
      • Restart the stage with the same parameters/scm/actions as the previous run
      • No management of workspace
      • Need to be able to union the previous run and the current runs flownodes to produce a visualisation for Blue Ocean
        • Implication is we do not have to copy flow nodes to the new run
      • Add a when condition that will evaluate as true only when on a restarted 

      Out of scope

      • Automatically stash/unstash the workspace
      • Scripted pipeline (technical limitation)

      Open questions

      • Should we be keeping stash data for every run? What is the option of least surprise?
        • JD thinks that keeping stashes around by default is the least surprising option - that way they do not have to turn anything on to make the feature work.
        • AB says this might blow out the storage requirements

      Notes
      There is less complexity and edge cases needed to be handled by making this functionality a Declarative Pipeline feature only.

      Technical notes
      Split off from JENKINS-33846 since abayer removed the component from that one, and I do not want this lost:

      For Declarative Pipelines, in principle you could skip some early stage's and just start running on a later one, using FlowCopier.

      This would be instead of using a checkpoint step, and would not be dependent on Groovy internals. While it is less flexible in some respects, it is no less flexible than it could be given the restrictions Declarative already imposes. This behavior would more closely match what you get from, say, the Build Pipeline plugin, but with the benefits of Jenkins Pipeline: stashes, exact SCM revisions, etc.

      (Conversely, you could also offer the ability to run a build skipping some of the later stages, somewhat analogously to running ant some-non-default-target.)

          [JENKINS-45455] Restarting stages

          Jesse Glick created issue -
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-33846 [ JENKINS-33846 ]
          Jesse Glick made changes -
          Description Original: Split off from JENKINS-33846 since [~abayer] removed the component from that one, and I do not want this lost:
          {quote}For Declarative Pipelines, in principle you could skip some early {{stage}}'s and just start running on a later one, using {{FlowCopier}}.
          {quote}
          This would be instead of using a {{checkpoint}} step, and would not be dependent on Groovy internals. While it is less flexible in some respects, it no less flexible than it _could_ be given the restrictions Declarative already imposes. This behavior would more closely match what you get from, say, the Build Pipeline plugin, but with the benefits of Jenkins Pipeline: stashes, exact SCM revisions, etc.

          (Conversely, you could also offer the ability to run a build skipping some of the _later_ stages, somewhat analogously to running {{ant some-non-default-target}}.)
          New: Split off from JENKINS-33846 since [~abayer] removed the component from that one, and I do not want this lost:
          {quote}For Declarative Pipelines, in principle you could skip some early {{stage}}'s and just start running on a later one, using {{FlowCopier}}.
          {quote}
          This would be instead of using a {{checkpoint}} step, and would not be dependent on Groovy internals. While it is less flexible in some respects, it is no less flexible than it _could_ be given the restrictions Declarative already imposes. This behavior would more closely match what you get from, say, the Build Pipeline plugin, but with the benefits of Jenkins Pipeline: stashes, exact SCM revisions, etc.

          (Conversely, you could also offer the ability to run a build skipping some of the _later_ stages, somewhat analogously to running {{ant some-non-default-target}}.)

          Andrew Bayer added a comment -

          So this would entail stashing things behind the scenes, right?

          Andrew Bayer added a comment - So this would entail stashing things behind the scenes, right?

          Jesse Glick added a comment -

          If you have a separate node per stage then there should be nothing special needed. This would not work if you were reusing one node across stages—but then again, neither does checkpoint.

          Jesse Glick added a comment - If you have a separate node  per stage then there should be nothing special needed. This would not work if you were reusing one node across stages—but then again, neither does checkpoint .
          James Dumay made changes -
          Description Original: Split off from JENKINS-33846 since [~abayer] removed the component from that one, and I do not want this lost:
          {quote}For Declarative Pipelines, in principle you could skip some early {{stage}}'s and just start running on a later one, using {{FlowCopier}}.
          {quote}
          This would be instead of using a {{checkpoint}} step, and would not be dependent on Groovy internals. While it is less flexible in some respects, it is no less flexible than it _could_ be given the restrictions Declarative already imposes. This behavior would more closely match what you get from, say, the Build Pipeline plugin, but with the benefits of Jenkins Pipeline: stashes, exact SCM revisions, etc.

          (Conversely, you could also offer the ability to run a build skipping some of the _later_ stages, somewhat analogously to running {{ant some-non-default-target}}.)
          New: *Use case*
          When long running Pipelines fail intermittently for environmental purposes the developer must be able to restart the execution of the stage that failed within the Pipeline. This allows the developer to recoup time lost running the pipeline to the point of failure.

          *Notes*
          There is less complexity and edge cases needed to be handled by making this functionality a Declarative Pipeline feature only.

          *Original description*
          Split off from JENKINS-33846 since [~abayer] removed the component from that one, and I do not want this lost:
          {quote}For Declarative Pipelines, in principle you could skip some early {{stage}}'s and just start running on a later one, using {{FlowCopier}}.
          {quote}
          This would be instead of using a {{checkpoint}} step, and would not be dependent on Groovy internals. While it is less flexible in some respects, it is no less flexible than it _could_ be given the restrictions Declarative already imposes. This behavior would more closely match what you get from, say, the Build Pipeline plugin, but with the benefits of Jenkins Pipeline: stashes, exact SCM revisions, etc.

          (Conversely, you could also offer the ability to run a build skipping some of the _later_ stages, somewhat analogously to running {{ant some-non-default-target}}.)
          James Dumay made changes -
          Description Original: *Use case*
          When long running Pipelines fail intermittently for environmental purposes the developer must be able to restart the execution of the stage that failed within the Pipeline. This allows the developer to recoup time lost running the pipeline to the point of failure.

          *Notes*
          There is less complexity and edge cases needed to be handled by making this functionality a Declarative Pipeline feature only.

          *Original description*
          Split off from JENKINS-33846 since [~abayer] removed the component from that one, and I do not want this lost:
          {quote}For Declarative Pipelines, in principle you could skip some early {{stage}}'s and just start running on a later one, using {{FlowCopier}}.
          {quote}
          This would be instead of using a {{checkpoint}} step, and would not be dependent on Groovy internals. While it is less flexible in some respects, it is no less flexible than it _could_ be given the restrictions Declarative already imposes. This behavior would more closely match what you get from, say, the Build Pipeline plugin, but with the benefits of Jenkins Pipeline: stashes, exact SCM revisions, etc.

          (Conversely, you could also offer the ability to run a build skipping some of the _later_ stages, somewhat analogously to running {{ant some-non-default-target}}.)
          New: *Use case*
          When long running Pipelines fail intermittently for environmental purposes the developer must be able to restart the execution of the stage that failed within the Pipeline. This allows the developer to recoup time lost running the pipeline to the point of failure.

          *Notes*
          There is less complexity and edge cases needed to be handled by making this functionality a Declarative Pipeline feature only.

          *Technical notes*
          Split off from JENKINS-33846 since [~abayer] removed the component from that one, and I do not want this lost:
          {quote}For Declarative Pipelines, in principle you could skip some early {{stage}}'s and just start running on a later one, using {{FlowCopier}}.
          {quote}
          This would be instead of using a {{checkpoint}} step, and would not be dependent on Groovy internals. While it is less flexible in some respects, it is no less flexible than it _could_ be given the restrictions Declarative already imposes. This behavior would more closely match what you get from, say, the Build Pipeline plugin, but with the benefits of Jenkins Pipeline: stashes, exact SCM revisions, etc.

          (Conversely, you could also offer the ability to run a build skipping some of the _later_ stages, somewhat analogously to running {{ant some-non-default-target}}.)
          James Dumay made changes -
          Link New: This issue is duplicated by JENKINS-46043 [ JENKINS-46043 ]

          Code changed in jenkins
          User: James William Dumay
          Path:
          content/projects/blueocean/roadmap/data.json
          http://jenkins-ci.org/commit/jenkins.io/3203ce31f3ba009573c8b6886b28f9d589390c6b
          Log:
          Add JENKINS-45455 to declarative roadmap

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James William Dumay Path: content/projects/blueocean/roadmap/data.json http://jenkins-ci.org/commit/jenkins.io/3203ce31f3ba009573c8b6886b28f9d589390c6b Log: Add JENKINS-45455 to declarative roadmap

          Code changed in jenkins
          User: R. Tyler Croy
          Path:
          content/projects/blueocean/roadmap/data.json
          http://jenkins-ci.org/commit/jenkins.io/c2ca1d3b21aae0971d42aefdf4b8b4442204d39a
          Log:
          Merge pull request #1064 from i386/patch-6

          Add JENKINS-45455 to declarative roadmap

          Compare: https://github.com/jenkins-infra/jenkins.io/compare/920bf01f2450...c2ca1d3b21aa

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: R. Tyler Croy Path: content/projects/blueocean/roadmap/data.json http://jenkins-ci.org/commit/jenkins.io/c2ca1d3b21aae0971d42aefdf4b8b4442204d39a Log: Merge pull request #1064 from i386/patch-6 Add JENKINS-45455 to declarative roadmap Compare: https://github.com/jenkins-infra/jenkins.io/compare/920bf01f2450...c2ca1d3b21aa

            abayer Andrew Bayer
            jglick Jesse Glick
            Votes:
            63 Vote for this issue
            Watchers:
            110 Start watching this issue

              Created:
              Updated:
              Resolved: