Cannot find syntax meaning

in this unity yml file for running an unity pipeline i can get only firs two nodes to work, it doesn’t go to build and test nodes.

And i don’t understand this syntax below:
what is .build and &build? what is << sign?

.build: &build
stage: build_and_test
<<: *unity_defaults
script:
- chmod +x ./ci/build.sh && ./ci/build.sh

here is the same

build-StandaloneLinux64:
<<: *build
variables:
BUILD_TARGET: StandaloneLinux64

Thanks for taking the time to be thorough in your request, it really helps! :blush:

Hey there,

Basically:

  • & is used for anchors
  • << is used for map merging
  • * is used for aliases
  • . (in front of the job name) indicates a job should be hidden (not executed) - but in this situation it’s a hidden job that defines what should be done in a job, and you can reference it with build anchor

It’s basically used to optimize gitlab-ci.yaml file and avoid repetitions in the job definition. To read more about it, have a look at GitLab YAML optimization.

Best regards!

3 Likes