Fix rules for dev and prod
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
toneeds
, which has the same effect with the added bonus of allowing a job to run earlier in some cases.- Orders the job config as:
stage
extends
image
(when used)- 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.
-
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.
-
I have evaluated the MR acceptance checklist for this merge request.