I'm using GitLab CI/CD and I have a pipeline that includes a job from a separate configuration file, which has seemed to work ok. It looks like this:
.gitlab-ci.yml:
stages:
- triggers
- build
- test
- deploy
trigger_infra:
stage: triggers
trigger:
include: src/infra/.gitlab-ci.yml
rules:
- changes:
- src/infra/lib/spa-stack.ts
src/infra/.gitlab-ci.yml:
deploy_spa:
stage: deploy
script:
- cd src/spa
However, I recently ran into the following scenario:
- Pushed code up that changed the
spa-stack.tsfile; build triggered and passed - Create merge request to master; build triggered and got an error!
- Merged to master; build triggered and passed
The error message for the merge build was "downstream pipeline cannot be created, Pipeline will not run for the selected trigger. The rules configuration prevented any jobs from being added to the pipeline."
What am I missing here? The downstream job has no rules configurations on it AFAIK, so I feel like it should always just run, no questions asked.