Add support for YAML anchors within CI includes

Problem to solve

With the implementation of extends: (docs here), the option to merge previously-defined job steps into .gitlab-ci.yml was created. However, for some users YAML anchors are still preferable, as discussed here (and elsewhere in that thread):

Notable quotes:

"We want to be able to overload specific jobs across pipelines (e.g. an integration test job) but still retain some baseline definitions so users don't have to repeat themselves."

"...Would allow us to manage all our CI template aliases in one dedicated repo and include those from all our other projects, and add those to jobs as-needed."

extends: does not allow for this level of customization, whereas YAML anchors do.

In many ways, this feature proposal is a re-statement of gitlab-foss#44592 (moved), which was closed (ostensibly due to our implementation of extends:).

Intended users

User experience goal

A DevOps Engineer/administrator should be able to maintain a shared project/repo of inheritable and customizable templates, that projects can include in their .gitlab-ci.yml, and utilize YAML anchors to take what they need and customize as desired.

Proposal

Further details

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖