top | item 45364278

(no title)

louiskottmann | 5 months ago

Gitlab has had that for a while, and it's very useful as in-between through dot targets.

i.e:

.scoped-env: &scoped-env

   key1: value1

   ...
Dot targets are ignored semantically, only inheritors make them useful.

Then further down you can reuse *scoped-env wherever you need.

You can also have anchors on individual lines and compose them. It's useful.

The author suggests using ad-hoc syntax, or meta-keys. Gitlab supports that [1] and I use them as well.

Different but also combinable uses, for various people. Nothing wrong with it.

1: https://docs.gitlab.com/ci/yaml/#extends

discuss

order

No comments yet.