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

Pipeline job: Abort older builds which are running

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Incomplete
    • Icon: Critical Critical
    • pipeline
    • None
    • Pipeline version 1.13

      Is there a way to make the current build abort older builds (which are running) in a workflow job ?
      Scenario:
      My workflow contains:

      • multiple stages to be run after every SCM changes
      • a stage to be run once every day based on the last build which passed all stages.
        I thought about using waitUntil and stage concurrency: 1

      Build #1 passed all normal stages and waits
      Build #2 passed all stages -> it should abort Build #1 and waits
      Build #3 passed all stages -> it should abort Build #2 and waits ...

      So I want to have just one build (the last one) waiting for the last stage and if waitUntil return true, only the last build should enter the last stage.

      Thank you in advance.
      Any help would be greatly appreciate.

            jglick Jesse Glick
            leon_k Leon Leon
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: