I would like to use the parent-child pipe feature for several projects in a mono repo.
Each project has its own .git-ci.yml and the parent YML references this. This approach can be found in many examples:
maven-versioning-extension:
trigger:
include: bs-portal/bsp-project/bsp-build/trunk/maven-build-extensions/akdb-version-extension/.gitlab/ci.yml
strategy: depend
maven-delivery-extension:
trigger:
include: bs-portal/bsp-project/bsp-build/trunk/maven-build-extensions/delivery-maven-extension/.gitlab/ci.yml
strategy: depend
If I push changes in a way that does not fit a child pipeline, I get the error:
downstream pipeline can not be created, no staged / jobs for this pipeline
For example, a child pipeline looks like this:
extension-versioning-build:
image: maven:3.8.3-openjdk-8-slim
stage: build
rules:
- if: $CI_COMMIT_TAG
when: never
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
changes:
- bs-portal/bsp-project/bsp-build/trunk/maven-build-extensions/delivery-maven-extension/**/*
script:
- mvn $MAVEN_CLI_OPTS clean deploy -f bs-portal/bsp-project/bsp-build/trunk/maven-build-extensions/delivery-maven-extension/pom.xml -Dmaven.test.skip=true
It is correct that the child pipeline has no jobs because the rules enforce it. But I’m thinking wrong somewhere, because a search for this error message in connection with Monorepo returns no hits.
Applying the rules of the child pipeline to the parent pipeline shouldn’t be the solution, but currently I would use the workaround.
What I would like to achieve is that child pipelines that do not match are ignored.
Thanks for tips.
Regards
Torsten