GitLab CI template: YAML anchor vs. ‘extends’ keyword
Creating a CI pipeline can get tedious quite quickly. Fortunately, there are a couple of ways to avoid creating multiple similar jobs. In case of GitLab’s .gitlab-ci.yml files, we can use job templates. Based on templates, we can easily define the actual jobs. The two most common methods to use a GitLab CI template are YAML anchors and ‘extends’ keyword. These are very similar, but there is at least one not obvious difference.