summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-06-15 16:37:57 +0300
committerValery Sizov <vsv2711@gmail.com>2015-06-15 16:37:57 +0300
commit0088a8eebc13cd980a4a9a6d242e33ee3d271dd2 (patch)
tree7ca8fbf08c2bf5c059b24239b8f322141798c4a8 /lib
parent2555bc84b25a1d66c52e2b24768ae7fb1e6dadbb (diff)
downloadgitlab-ci-0088a8eebc13cd980a4a9a6d242e33ee3d271dd2.tar.gz
improve parser
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab_ci_yaml_processor.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab_ci_yaml_processor.rb b/lib/gitlab_ci_yaml_processor.rb
index 274754f..9a69ca6 100644
--- a/lib/gitlab_ci_yaml_processor.rb
+++ b/lib/gitlab_ci_yaml_processor.rb
@@ -7,9 +7,9 @@ class GitlabCiYamlProcessor
@config.delete(:before_script)
- @jobs = @config.select{|key, value| value[:test]}
+ @jobs = @config.select{|key, value| value[:type] != "deploy"}
- @deploy_jobs = @config.select{|key, value| value[:deploy]}
+ @deploy_jobs = @config.select{|key, value| value[:type] == "deploy"}
end
def deploy_builds_for_ref(ref, tag = false)
@@ -27,7 +27,7 @@ class GitlabCiYamlProcessor
def builds
@jobs.map do |name, job|
{
- script: "#{@before_script.join("\n")}\n#{normilize_script(job[:test])}",
+ script: "#{@before_script.join("\n")}\n#{normilize_script(job[:script])}",
tags: job[:tags] || [],
name: name,
only: job[:only],
@@ -39,7 +39,7 @@ class GitlabCiYamlProcessor
def deploy_builds
@deploy_jobs.map do |name, job|
{
- script: "#{@before_script.join("\n")}\n#{normilize_script(job[:deploy])}",
+ script: "#{@before_script.join("\n")}\n#{normilize_script(job[:script])}",
tags: job[:tags] || [],
name: name,
only: job[:only],