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

Option to interrupt remaining branches when one branch fails

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • None
    • workflow plugin 1.1

      As recorded in https://groups.google.com/d/msg/jenkinsci-dev/kgEc7vZQgi0/IC1rH_6KwNYJ:

      Our deploy process currently builds deploy artifacts and runs tests at the same time. I see how we could implement that using workflow via the 'parallel' step. However, we also want the behavior that if and when build-artifacts fails, it immediately cancels the running tests and fails the deploy job; and likewise if the tests fail, it immediately cancels the building of artifacts and fails the deploy job. If both succeed, then the deploy job continues.

      This is a feature request to implement this sibling-cancel: with a flag (or perhaps as the default, though that's kinda scary), if one of the jobs in parallel() fails, then parallel cancels the other jobs.

      It sounds like parallel returns a map from job-label to job-status. I think under this behavior, the job-status would be "failed" for the job that failed, and "cancelled" for the sibling jobs that were cancelled.

          [JENKINS-26034] Option to interrupt remaining branches when one branch fails

          Craig Silverstein created issue -
          Jesse Glick made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Kohsuke Kawaguchi [ kohsuke ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26052 [ JENKINS-26052 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-26033 [ JENKINS-26033 ]
          Jesse Glick made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Summary Original: Add support for sibling-cancel in parallel(). New: Option to interrupt remaining branches when one branch fails
          James Nord made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ] New: James Nord [ teilo ]
          Jesse Glick made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 160024 ] New: JNJira + In-Review [ 196284 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Craig Silverstein made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            Unassigned Unassigned
            csilvers Craig Silverstein
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: