I am having one parent pipeline and one child pipeline. The child pipeline creates dynamically another child pipeline. The problem is that it seems that the rules are not being applied, for the trigger job within the first child pipeline:
trigger_journey_tests:
stage: trigger_journey_tests
rules:
- if: '$CI_COMMIT_REF_NAME == "integration" && $CONTINUOUS_DEPLOYMENT_FRONTEND_WIDGET == "true"'
variables:
CONTINUOUS_DEPLOYMENT_FRONTEND_WIDGET: $CONTINUOUS_DEPLOYMENT_FRONTEND_WIDGET
trigger:
include:
- artifact: autoDeployment.yml
job: test_integration_on_auto_deploy
I am getting in gitlab this, even though neither of my conditions is true. Why is the Job created in the first place if non of my conditions is true?
trigger_journey_tests job: undefined dependency: test_integration_on_auto_deploy
The other job looks like this:
test_integration_on_auto_deploy: # only on auto deploy
image: registry.gitlab.com/my/docker-container
stage: test_e2e
tags:
- 'test'
rules:
- if: '$CI_COMMIT_REF_NAME == "integration" && $CONTINUOUS_DEPLOYMENT_FRONTEND_WIDGET == "true"'
allow_failure: true
dependencies:
- build_test_container
script:
- echo start "Tests Master Job"
- npm run build:${CUSTOMER}-test
- bash shell/test_master.sh ${CUSTOMER} IS_BUILD
after_script:
- bash shell/deployment/deploymentSwitch.sh $CI_JOB_STATUS
artifacts:
when: always
paths:
- autoDeployment.yml
As you can see this job has the same condition and is not created, is this a bug, because gitlab cannot deal with rules in combination with the trigger keyword within a child pipeline?
Here is a minimal repo to reproduce: