Mailinglist Archive: opensuse-factory (607 mails)

< Previous Next >
[opensuse-factory] Using YAML Merge Keys in Job templates

you might know already that you can use openQA job templates to directly specify settings for a test.
See Marius' E-Mail

In YAML, you can use anchors/aliases to reuse a mapping in several places.

We now switched to a new YAML module (YAML::PP) which also allows "YAML Merge Keys", that allow to reuse a mapping, and add other keys to it.

- jobname:
machine: ...
settings: &common
FOO: a
BAR: b
- jobname2:
machine: ...
<<: *common
FOO: other value # overrides the value from *common
BAZ: c

The location of the `<<` key is not important, it will always be overriden by keys explicitly defined in the mapping. So it should be always on top for readability.

For a full example and documentation on which values take precedence, see

With that change, we are also completely compatible to YAML 1.2, while the previous YAML module only implemented a subset/mixture of 1.1 and 1.2.

To get an overview which values are special and need quoting in YAML 1.2, we added a table here:

Feel free to ask any questions!

tina & tools team
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages