jenkinsci / jenkinsci/parameterized-trigger-plugin

[JENKINS-11257] Stopping a parent job doesn't stop the triggered child jobs

Open
#496 17 comments 0 reactions 0 assignees View on GitHub
component:parameterized-trigger-plugin enhancement imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
77
Forks
174
Avg merge
22h 27m
Merged PRs (30d)
1

Description

Assume you have a job A that launch a child Job B and that job A has to wait Job B finished to continue its steps.

If you stopped job A while job B is processing, the job B isn't stopped.

It should be stopped.

Precondition:

I have a parent job "Parent" that triggers child jobs "Child(1-N)", and then blocks waiting for them to finish.

Action:

1. Start Parent job.

2. Wait for children to launch.

3. Abort Parent job.

Current result: 

Parent job aborts but children continue to run. If the child jobs have no meaning outside of the parent, then child jobs have to be manually aborted.

I can see why you would want this behavior. It is certainly the correct behavior in the "post-build step" case. It is probably correct in the "non-blocking build step" case. In the case of the parent build blocking on children completing, there are definitely scenarios where it is not.

Desired Enhancement:

When "Block on child job completion" checkbox is checked, a list of options is shown. Add option to the list: "Child job action when parent job is aborted". Values: "None, continue running (default)", "Abort immediately".

---
Originally reported by nicolas_godelu, imported from: Stopping a parent job doesn't stop the triggered child jobs


  • assignee: huybrechts
  • status: In Progress
  • priority: Major
  • component(s): parameterized-trigger-plugin
  • resolution: Unresolved
  • votes: 31
  • watchers: 33
  • imported: 2025-12-07

Raw content of original issue

Assume you have a job A that launch a child Job B and that job A has to wait Job B finished to continue its steps.

If you stopped job A while job B is processing, the job B isn't stopped.
It should be stopped.

Precondition:
I have a parent job "Parent" that triggers child jobs "Child(1-N)", and then blocks waiting for them to finish.

Action:
1. Start Parent job.
2. Wait for children to launch.
3. Abort Parent job.

Current result: 
Parent job aborts but children continue to run. If the child jobs have no meaning outside of the parent, then child jobs have to be manually aborted.

I can see why you would want this behavior. It is certainly the correct behavior in the "post-build step" case. It is probably correct in the "non-blocking build step" case. In the case of the parent build blocking on children completing, there are definitely scenarios where it is not.

Desired Enhancement:
When "Block on child job completion" checkbox is checked, a list of options is shown. Add option to the list: "Child job action when parent job is aborted". Values: "None, continue running (default)", "Abort immediately".

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.