I am trying to setup a complex multi-project pipeline, something line:
Project A -> Project B
-> Project C -> Project E
-> Project D -> Project E
I was able to setup all the .gitlab-ci.yml to trigger the tree correctly and update the top level status based on failure on the dependencies. What I am now trying to do is getting Project E job to only be executed once. Is there a way to get it to dedupe and get it to run that job once?
For example, on project A, you put a trigger on project B. What does it mean exactly ? Like when the pipeline run on project A (.gitlab-ci.yml from A), he will run the .gitlab-ci.yml from B ?
Exactly - you make project A pipeline trigger the pipeline of project B. Project B will get it’s own pipeline ID and everything, but when you look at project A pipeline, you can see the full set. If you have multiple triggers (i.e. project A triggers project B and C), you can see the concurrent executions (it will show you a tree view showing the split and each of the pipelines).
It’s pretty cool, but if you have multiple projects trigger the same project, you would see that one project getting triggered multiple times… If it was smarter, it would have trigger all the direct dependencies up to that project, then hold, run that one project and now it can continue single execution. It might not be a problem on small number, but when you have complex system it add up quite an overhead…