diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-18 11:47:35 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-18 11:50:11 +0100 |
commit | 8114786665a59526a988ce346393243996769aff (patch) | |
tree | 6e7f8a58021825a02d4465bfec3e8b449b9f2e35 /lib | |
parent | 0ae7c954537663aa2a574133e42d05eafe5db6fb (diff) | |
download | gitlab-ce-8114786665a59526a988ce346393243996769aff.tar.gz |
Fix builds scheduler when first build is allowed to fail
Before this fix when there was only one relevant, previous build and it
failed, but was allowed to fail, entire build had been marked as
skipped.
Closes #3192
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ci/status.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/ci/status.rb b/lib/ci/status.rb index c02b3b8f3e4..3fb1fe29494 100644 --- a/lib/ci/status.rb +++ b/lib/ci/status.rb @@ -1,11 +1,9 @@ module Ci class Status def self.get_status(statuses) - statuses.reject! { |status| status.try(&:allow_failure?) } - if statuses.none? 'skipped' - elsif statuses.all?(&:success?) + elsif statuses.all? { |status| status.success? || status.ignored? } 'success' elsif statuses.all?(&:pending?) 'pending' |