Scenario
I have two pipelines:
- Pipeline A builds an artifact called artifact A
- Pipeline B builds an artifact called artifact B
The following is true about the relationship between these pipelines
- Both pipelines have independent YAML files which trigger off commits to the master branch that affects one or more files associated with the pipeline
- Both pipelines share some of the same source files and therefore it's possible that a single commit could trigger both pipelines
- Pipeline B is dependent on artifact A and therefore should always yield and wait for Pipeline A in cases where both pipelines are triggered
Question
Is it possible to establish a relationship between Pipeline A and Pipeline B such that they can be triggered independently and yet, if they are both triggered at the same time, Pipeline B always waits for Pipeline A to finish?