buildkite / feedback

Got feedback? Please let us know!
https://buildkite.com
25 stars 24 forks source link

trigger step flag to prevent retrigger of a pipeline that has already been triggered in the trigger chain #497

Closed nhooyr closed 5 years ago

nhooyr commented 5 years ago

I want to use buildkite for a monorepo, my vision is as follows:

  1. Each directory is associated with its own pipeline. This would be automated via a script and the buildkite API to create the pipeline for each directory.
  2. There is a pipeline trigger, that is triggered whenever the repo is modified. This pipeline will generate triggers for the pipelines whose directories have been modified.

We can already do the above thus far but here is where my feature request comes in.

  1. Each pipeline that has been triggered will check if there is any other directory that depends on its directory and if there is, it will trigger this directory's pipeline.

The problem is that what if this directory's pipeline was already running? Maybe it was changed in the commit or another one of its dependency directories' pipeline was running. Then we'll end up having two of the same pipelines running for the same commit which is unnecessary and confusing.

What I want is for trigger to have a flag that if any pipeline in the current chain of triggered pipelines has already triggered a given pipeline with the same commit, then instead of starting a new build, buildkite will use the running build and display its status just like it would a new build.

Related #496

toolmantim commented 5 years ago

Thanks for the feedback.

We're discussing this one here, which might be better than splitting the discussions https://forum.buildkite.community/t/declare-dependencies-between-jobs/116/6