Backend: CI variables set via push options don't work in child pipelines
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
CI variables set via push options don't work in child pipelines.
Steps to reproduce
- Create parent pipeline
.gitlab-ci.yml:
stages:
- test0
- test1
test0:
stage: test0
script:
- env
test1:
stage: test1
trigger:
include:
- local: /.gitlab-ci-include.yml
strategy: depend
- Create child pipeline
.gitlab-ci-include.yml:
stages:
- test2
test1:
stage: test2
script:
- env
- Commit changes
- Push with CI variable in push options:
git push -o ci.variable="PUSH_OPTIONS_TEST=test"
Example Project
https://gitlab.com/sandra17/push-options-test
What is the current bug behavior?
CI variable PUSH_OPTIONS_TEST is set only in the parent pipeline (https://gitlab.com/sandra17/push-options-test/-/jobs/1416156614), but not in the child pipeline (https://gitlab.com/sandra17/push-options-test/-/jobs/1416158678).
What is the expected correct behavior?
CI variables should be set in both parent and child pipelines.
User Impact
CI variables that are referenced in child pipelines need the values to be set in both the parent and child pipelines so that they can be properly used in any referenced locations.
Edited by 🤖 GitLab Bot 🤖