diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-11 13:26:56 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-11 13:53:17 +0100 |
commit | 9f1279184b85927a12b93df00896c57b12373a9a (patch) | |
tree | c3f940c2e6bfc98a933b94e5089165a293156150 /lib/gitlab/ci | |
parent | e5d53df70e6bebf267e5709790842cb674ee96b0 (diff) | |
download | gitlab-ce-9f1279184b85927a12b93df00896c57b12373a9a.tar.gz |
Add extended status for build failed but allowed to
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/status/build/failed_allowed.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/gitlab/ci/status/build/failed_allowed.rb b/lib/gitlab/ci/status/build/failed_allowed.rb new file mode 100644 index 00000000000..807afe24bd5 --- /dev/null +++ b/lib/gitlab/ci/status/build/failed_allowed.rb @@ -0,0 +1,27 @@ +module Gitlab + module Ci + module Status + module Build + class FailedAllowed < SimpleDelegator + include Status::Extended + + def label + 'failed (allowed to fail)' + end + + def icon + 'icon_status_warning' + end + + def group + 'failed_with_warnings' + end + + def self.matches?(build, user) + build.failed? && build.allow_failure? + end + end + end + end + end +end |