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

Terminating parent pipeline build does not terminate child builds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None
    • Jenkins 2.429

      When terminating a Jenkins pipeline build, I expect any child build triggered by this pipeline to be terminated as well, however, the child build continues running even after the parent has been terminated,
      I'm not sure if this is a bug or a feature - if the latter, how can I ensure that the child pipeline is terminated as well?

      Repro Steps:

      1. Create a Jenkins pipeline (my/pipeline) that trigger a child pipeline using `build(job: "my/child/pipeline", propagate: false, wait: true)`.
      2. Run the pipeline and terminate it after the child pipeline is triggered (in my case I'm using `Jenkins.instance.getItemByFullName('my/pipeline').getBuild('1234').doTerm()` to terminate part of other automation)

      Expected Result:
      The termination of the parent pipeline should also terminate any child pipelines

      Actual Result:
      The parent pipeline is terminated, but the child pipeline is not terminated

            Unassigned Unassigned
            benipeled Beni Peled
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: