Skip to content

Update remaining only except to rules in pipeline

Marcel Amirault requested to merge runner-only-to-rules into main

What does this MR do?

Related to #5019 (closed)

Following on my previous MRs, this removes the final examples of only and except from the Runner pipeline.

The remaining usage of only / except was in relation to releases, and all those are now updated to rules. The release rules were added to .gitlab/ci/_rules.gitlab-ci.yml.

It's a bit difficult to follow, but most jobs (eventually, after multiple hops) inherited the .docker template job, and the settings were overrode along the way (sometimes multiple times).

To change all instances to rules, I followed this process:

  1. Find every extends: that added only or except to a job, and then copy that inherited only/except config directly into the job ("interim").
  2. Find all the different interim: only / except combinations, and create new rules for each one.
  3. Replace the interim only / except in every job with a new extends to the appropriate rule.
  4. A few .job sections had only / except, and those were removed.
  5. Any .job sections that were only / except only were now blank, and completely removed, for example:
    • .release_development:
    • .release_bleeding_edge:
    • .release_stable:

Why was this MR needed?

What's the best way to test this MR?

What are the relevant issue numbers?

Edited by Marcel Amirault

Merge request reports