diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-02-28 16:48:39 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-06 10:04:04 +0100 |
commit | be039d22d71afa7c8b2635cd8820b8b4566d15b8 (patch) | |
tree | 2bbd17d43614ae93ed5bca9cb901fb788ce33b37 /lib | |
parent | 6cc02e084f96d7d3cb56870cbe545c67e6a564bb (diff) | |
download | gitlab-ce-be039d22d71afa7c8b2635cd8820b8b4566d15b8.tar.gz |
Make manual actions blocking
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/config/entry/job.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/status/manual.rb | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb index 7f7662f2776..69e2a8a2563 100644 --- a/lib/gitlab/ci/config/entry/job.rb +++ b/lib/gitlab/ci/config/entry/job.rb @@ -104,6 +104,10 @@ module Gitlab (before_script_value.to_a + script_value.to_a).join("\n") end + def allow_failure + super || self.when == 'manual' + end + private def inherit!(deps) diff --git a/lib/gitlab/ci/status/manual.rb b/lib/gitlab/ci/status/manual.rb new file mode 100644 index 00000000000..741b3dd96e9 --- /dev/null +++ b/lib/gitlab/ci/status/manual.rb @@ -0,0 +1,19 @@ +module Gitlab + module Ci + module Status + class Manual < Status::Core + def text + 'manual' + end + + def label + 'manual' + end + + def icon + 'icon_status_manual' + end + end + end + end +end |