Use global instead of job-level variables when we want to override them
Job-level variables override the global variables set in each project, e.g., .gitlab-ci.yml
in the staging project sets
QA_CAN_TEST_GIT_PROTOCOL_V2: 'true'
, as a global but was overriden by the false
value in .qa
because it's included at the job level.
See https://docs.gitlab.com/ee/ci/variables/README.html#priority-of-environment-variables
If we set the desired defaults as global variables here, then each project should be able to override then as globals (meaning we should be able to avoid having to change all of the per-project values).
Test pipelines:
- Staging: https://gitlab.com/gitlab-org/quality/staging/pipelines/128628595
- Runs admin and git protocol v2 tests: https://gitlab.com/gitlab-org/quality/staging/-/jobs/481068100
Run options: include {:quarantine=>true} exclude {:skip_signup_disabled=>true, :orchestrated=>true}
- Runs admin and git protocol v2 tests: https://gitlab.com/gitlab-org/quality/staging/-/jobs/481068100
- Canary: https://gitlab.com/gitlab-org/quality/canary/pipelines/128630453
- Does not run admin and git protocol v2 tests: https://gitlab.com/gitlab-org/quality/canary/-/jobs/481074552
Run options: include {:quarantine=>true} exclude {:skip_signup_disabled=>true, :requires_git_protocol_v2=>true, :requires_admin=>true, :orchestrated=>true}
- Does not run admin and git protocol v2 tests: https://gitlab.com/gitlab-org/quality/canary/-/jobs/481074552
Edited by Mark Lapierre