According to the documentation, parent-child pipelines should work well with rules
- so i'm trying to setup a parent-child pipeline, where the child pipelines only run when something has actually changed in the sub-service. Using the following setup:
main .gitlab-ci.yml:
trigger_service_a:
trigger:
include: service_a/.gitlab-ci.yml
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- service_a/*
when: always
service_a/.gitlab-ci.yml:
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- service_a/*
when: always
service_a:
script:
- echo "run"
However, when i push in a merge request without changes inside service_a, the pipeline fails with : trigger_service_a - failed - (downstream pipeline can not be created, Pipeline filtered out by workflow rules.)
Even if i change something in the service_a, i still get the same error.
How can i trigger child-pipelines in branches and merge requests only when something has changed in the sub-service?