diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-06-02 14:10:07 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-06-03 16:36:54 +0300 |
commit | d61d6eea995bf4e87513124c9c2ccd1251ca6f3f (patch) | |
tree | 679712d7b17730ba72d6ec30e8e7ad2bca0eb1a9 /lib | |
parent | 9d89ea49948ecb6bf6cf2df5d4bff6980616b295 (diff) | |
download | gitlab-ci-d61d6eea995bf4e87513124c9c2ccd1251ca6f3f.tar.gz |
Add migrator for deprecated jobs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab_ci_yaml_processor.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/gitlab_ci_yaml_processor.rb b/lib/gitlab_ci_yaml_processor.rb index 3d83e08..8adea84 100644 --- a/lib/gitlab_ci_yaml_processor.rb +++ b/lib/gitlab_ci_yaml_processor.rb @@ -27,7 +27,8 @@ class GitlabCiYamlProcessor name: job[:name], commands: "#{@before_script.join("\n")}\n#{job[:script]}", deploy: true, - refs: job[:refs] + refs: job[:refs], + tag_list: job[:runner] } end end @@ -70,7 +71,7 @@ class GitlabCiYamlProcessor { script: job, runner: "", name: job[0..10], branches: true, tags: true } else { - script: job[:script], + script: job[:script].strip, runner: job[:runner] || "", name: job[:name] || job[:script][0..10], branches: job[:branches].nil? ? true : job[:branches], @@ -86,9 +87,10 @@ class GitlabCiYamlProcessor { script: job, refs: [], name: job[0..10].strip } else { - script: job[:script], + script: job[:script].strip, refs: (job[:refs] || "").split(",").map(&:strip), - name: job[:name] || job[:script][0..10].strip + name: job[:name] || job[:script][0..10].strip, + runner: job[:runner] || "", } end end |