Multi target docker images never triggered when template included
👓 What did you see?
When including the multi-target-docker-images.gitlab-ci.yml
template, the job to create child pipelines is never run.
✅ What did you expect to see?
multiple-docker-images
job to exist and child pipelines to be created.
💻 Where does this happen?
GitLab CI pipelines
🔬 How do I recreate this?
- Follow instructions in
multi-target-docker-images.gitlab-ci.yml
to add the template to the pipeline - Run the pipeline
📚 Any additional information?
This looked to be working before. The problematic part looks to be:
multiple-docker-images:
rules:
- if: $MULTI_DOCKER_IMAGE_BUILD_ENABLED
when: never
As removing this specific rule or removing the MULTI_DOCKER_IMAGE_BUILD_ENABLED: "1"
from variables
will make the job and creation of child pipelines work. Note that moving MULTI_DOCKER_IMAGE_BUILD_ENABLED: "1"
to parallel:matrix
also doesn't work.
Pipeline that did work:
- https://gitlab.developers.cam.ac.uk/uis/devops/experiments/st981-test/lab-allocator/-/pipelines/609578 (https://gitlab.developers.cam.ac.uk/uis/devops/experiments/st981-test/lab-allocator/-/commit/80bb5016f4b457945c7589f6e5b331d509344d74 / !92 (67ffef3d))
Pipeline that doesn't work:
- https://gitlab.developers.cam.ac.uk/uis/devops/iam/authentication/shibboleth/attributes-proxy/-/pipelines/636525 (https://gitlab.developers.cam.ac.uk/uis/devops/iam/authentication/shibboleth/attributes-proxy/-/merge_requests/22/diffs?commit_id=b0c4011a37e3c0d7f49b9e02b3ccb8bf7b346fe3 / 528b26c6)
Looking at the above, it looks like we never actually ran the pipeline with the latest revision of the code before merging. I think, reverting to multiple files, might be the way forward. Discussion about this: