diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2016-03-11 15:04:32 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2016-03-11 15:04:32 +0300 |
commit | 1cdc355a0fac752a9cd27552f3cf6823e8deaf87 (patch) | |
tree | 63d9ea5820ca9aedeba1685b06971869062a476f /lib | |
parent | 0c5b92cbd7afe7483470c7d33a0b8475ba91d390 (diff) | |
parent | 344d6e6f89cceb33e371e10de8262154ee108fbe (diff) |
Merge branch 'gitlab-ci-yaml-alias' into 'master'
Support YAML alias/anchor usage in .gitlab-ci.yml
This allows to reuse one job as a template for another one:
```
job1: &JOBTMPL
script: execute-script-for-job
job2: *JOBTMPL
```
This also helps to solve some of the issues in gitlab-org/gitlab-ci#342
See merge request !2958
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ci/gitlab_ci_yaml_processor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index 1a3f662811a..28e074cd289 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -10,7 +10,7 @@ module Ci attr_reader :before_script, :image, :services, :variables, :path, :cache def initialize(config, path = nil) - @config = YAML.safe_load(config, [Symbol]) + @config = YAML.safe_load(config, [Symbol], [], true) @path = path unless @config.is_a? Hash |