I have projects in many git repositories, starting with the base api and then branching outwards. When the API materially changes, I want to verify that downstream projects (that use the particular API) work correctly. I hoped this workflow would be supported out of the box:
- Make changes on branch to base API
- Create same named branch on a subset of projects that may be affected by the change
- Execute the build triggering children with
run-A:
stage: .post
trigger:
project: a
branch: $CI_COMMIT_BRANCH
strategy: depend
run-B:
...
Sometimes I want to verify A, sometimes B, sometimes both or neither. If I don't have the same branch in A and B, I start getting
Downstream pipeline cannot be created; reference cannot be found
How can I get gitlab to depend on the results of other project builds, but ignore the downstream project if the branch doesn't exist?
$CI_COMMIT_BRANCH
)) does not work? At least that is what I am seeing. Putting in a constant there i.e,branch: develop
works. But, I am passing the branch name as a variable to the upstream project. – Cannabis