diff options
author | Pascal Bach <pascal.bach@siemens.com> | 2016-02-24 15:48:56 +0100 |
---|---|---|
committer | Pascal Bach <pascal.bach@siemens.com> | 2016-03-08 08:49:32 +0100 |
commit | 344d6e6f89cceb33e371e10de8262154ee108fbe (patch) | |
tree | 5b5944b926c9135e6db3c6abd661b5788d92d786 /lib/ci | |
parent | 75a67ac0c72b24b07d6fa032e92997eb66ec226e (diff) | |
download | gitlab-ce-344d6e6f89cceb33e371e10de8262154ee108fbe.tar.gz |
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 #342
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Fabio Huser <fabio.huser@siemens.com>
Diffstat (limited to 'lib/ci')
-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 |