Remove duplication of YAML anchors by moving `rules` hidden jobs into shared CI config file
What is the productivity problem to solve?
YAML anchors are duplicated across CI config files.
Problem identification checklist
-
The root cause of the problem is identified. -
The surface of the problem is as small as possible.
What are the potential solutions?
We started using hidden jobs to encapsulate rules:
With this approach, it's possible to move all of them into a shared rules.gitlab-ci.yml
and have YAML anchors shared across these .rule
hidden jobs.
It would remove the need to duplicate the YAML anchors across files, because now all the reference to the YAML anchors is contained in a single file.
We can do this after we complete adopting rule
.
Edited by Rémy Coutable