Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-06 14:01:33 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-06 14:01:33 +0300
commit66dd20966166695695079958d36527606425cb88 (patch)
tree72a8f5476561b9db8169457954a95fd02cb7c648 /lib/gitlab/ci/config
parent3788f5face7660c43374d85a4fdbeca04e7b8d68 (diff)
Ignore job by default if it is a manual action
This makes it possible to maintain backwards compatibility with configs created when manual actions were non-blocking. From now manual actions are blocking if configured with `allow_failure: false`, otherwise manual actions are optional, and their status is ignored.
Diffstat (limited to 'lib/gitlab/ci/config')
-rw-r--r--lib/gitlab/ci/config/entry/job.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb
index 7f7662f2776..176301bcca1 100644
--- a/lib/gitlab/ci/config/entry/job.rb
+++ b/lib/gitlab/ci/config/entry/job.rb
@@ -104,6 +104,14 @@ module Gitlab
(before_script_value.to_a + script_value.to_a).join("\n")
end
+ def manual_action?
+ self.when == 'manual'
+ end
+
+ def ignored?
+ allow_failure.nil? ? manual_action? : allow_failure
+ end
+
private
def inherit!(deps)
@@ -135,7 +143,8 @@ module Gitlab
environment_name: environment_defined? ? environment_value[:name] : nil,
coverage: coverage_defined? ? coverage_value : nil,
artifacts: artifacts_value,
- after_script: after_script_value }
+ after_script: after_script_value,
+ ignore: ignored? }
end
end
end