Skip to content

Fix rules for dev and prod

Marcel Amirault requested to merge split-pipeline-config-3 into main

What does this MR do and why?

This is a recreation of !104 (merged), with the rules fixed.

Following the configuration in the old docs project, let's modularize the rules configuration. This makes use of the pipeline name variables to make it easier in the future to manage when specific jobs should run.

This MR:

  • Adds rules to all jobs to make when they run explicit.
  • Removes pipeline names that are not used.
  • Creates a global.gitlab-ci.yml file to contain all the shared configuration.
  • Moves the go parallel:matrix config into the single job that uses it (no need to share it), and use the defined variables explicitly.
  • Changes dependencies to needs, which has the same effect with the added bonus of allowing a job to run earlier in some cases.
  • Orders the job config as:
  1. stage
  2. extends
  3. image (when used)
  4. Other config.

And additionally, only uses one rules per extends section. The first version had rules in extends twice sometimes, which were overwriting each other. Instead, add the multiple rules into the .rules_dev, .rules_dev_and_prod, and .rules_prod config sections, and then select one per job. This actually ends up much smaller and easier to understand, which was nice 👍

Related to #49 (closed)

Screenshots, screen recordings, or links to review app

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Marcel Amirault

Merge request reports