Pass false to trigger if EE_PACKAGE not set

This commit is contained in:
Balasankar C 2017-06-09 16:37:50 +05:30
parent 66aad16d1a
commit fb2ab2a374
No known key found for this signature in database
GPG key ID: 96EDAB9B2E6B7171

View file

@ -9,7 +9,7 @@ params = {
"token" => ENV["BUILD_TRIGGER_TOKEN"],
"variables[GITLAB_VERSION]" => ENV["CI_COMMIT_SHA"],
"variables[ALTERNATIVE_SOURCES]" => true,
"variables[ee]" => ENV["EE_PACKAGE"]
"variables[ee]" => ENV["EE_PACKAGE"] || "false"
}
Dir.glob("*_VERSION").each do |version_file|
@ -19,4 +19,9 @@ end
res = Net::HTTP.post_form(uri, params)
pipeline_id = JSON.parse(res.body)['id']
puts "Triggered pipeline can be found at https://gitlab.com/gitlab-org/omnibus-gitlab/pipelines/#{pipeline_id}"
unless pipeline_id.nil?
puts "Triggered pipeline can be found at https://gitlab.com/gitlab-org/omnibus-gitlab/pipelines/#{pipeline_id}"
else
puts "Trigger failed. The response from trigger is: "
puts res.body
end