Skip to content

Cancel downstream builds if was triggered by GHPRB.#738

Open
eloycoto wants to merge 1 commit intojenkinsci:masterfrom
eloycoto:DownstreamJobs
Open

Cancel downstream builds if was triggered by GHPRB.#738
eloycoto wants to merge 1 commit intojenkinsci:masterfrom
eloycoto:DownstreamJobs

Conversation

@eloycoto
Copy link
Copy Markdown

@eloycoto eloycoto commented Mar 6, 2019

On the situation where a build trigger a new async builds, if any user updates
the PR only one build will be cancel, the upstream one.

When downstreams jobs take a lot to run, the CI is block with builds taht does
not make sense to have running at all.

With this change, each build is validated if the cause is a UpstreamCause and
if it is true, this validates that the parent build was triggered by GHPRB, if
so will be cancel if the PR id match.

  • I didn't found where the CancelOnUpdates is tested, I'm happy to add a test,
    but I would need a bit of help.

  • I'm not sure about adding things to Changelog, the version in Changelog in
    1.41, but releases in Github is 1.42, happy to update also that, but need
    some insights.

On the situation where a build trigger a new async builds, if any user
updates the PR only one build will be cancel, the upstream one.

When downstreams jobs take a lot to run, the CI is block with builds
taht does not make sense to have running at all.

With this change, each build is validated if the cause is a
`UpstreamCause` and if it is true, this validates that the parent build
was triggered by GHPRB, if so will be cancel if the PR id match.

Signed-off-by: Eloy Coto <eloy.coto@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant