Moving Auto DevOps jobs syntax to `rules`
Goal
Switch all Auto DevOps jobs from using only / except
to rules
.
Impact
Only users who extend Auto DevOps jobs
Impacted users (small percentage?) will see their pipeline fail to start with something like:
jobs:<job-name> config key may not be used with `rules`: only
- AFAIK, this only impacts users who extend the templates below, and uses
only/except
in their extension - We cannot mix
only/except
andrules
in the same job. So there is currently nothing for users to do except wait for the templates to be updated, (it will break their pipeline, but only some, see 1), then update their extension to userules
.
What if I am not ready to update my pipelines ?
For affected users who extend Auto DevOps templates, but are not ready to update their pipelines, you can switch to the GitLab 12.10 based templates.
Impact on GitLab.com [Tentatively scheduled for 2020-05-13]
Users who extend Auto DevOps and uses only/except
in their extension will immediately have their pipeline fail once deployed to GitLab.com
- Update 2020-05-11: I have set MWPS on all 5 MRs referred to in #proposal. Assuming no broken masters, deploys are OK, this should reach GitLab.com in the next 24 hours.
- Update 2020-05-12: The MRs have reach staging.gitlab.com. This should be live on gitlab.com today
- Update 2020-05-13: This was deployed to GitLab.com at May 13, 2020 7:56pm GMT+0000
Proposal
Switch all of the following jobs in lib/gitlab/ci/templates/Jobs/
to using if
:
-
Build.gitlab-ci.yml: !30895 (merged) -
Test.gitlab-ci.yml: !30876 (merged) -
Deploy.gitlab-ci.yml: !31290 (merged) -
[ ] DAST-Default-Branch-Deploy.gitlab-ci.yml(I'm going to assume this will be covered by devopssecure -
Browser-Performance-Testing.gitlab-ci.yml: !31413 (merged) -
Code-Quality.gitlab-ci.yml: !30896 (merged)
Note: Work was already done in !25492 (merged) but had to be reverted as it introduced a breaking change
Note2: This is the first part of fixing Auto DevOps tests due to changing CI/CD syntax. See: #34304 (comment 316597080)