diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2016-02-18 14:28:25 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-18 16:18:45 +0100 |
commit | bdbe892ea229e8916f922b168c239db393f3d677 (patch) | |
tree | bec7efd4019569ffebf8e3328f9c803e18975c36 /lib | |
parent | fcedf80f467a856f109f6666cf9a72ae3c5295eb (diff) | |
download | gitlab-ce-bdbe892ea229e8916f922b168c239db393f3d677.tar.gz |
Merge branch 'fix/ci-first-job-allow-failure' into 'master'
Fix CI builds scheduler when first build in stage is allowed to fail
This fixes an edge case in CI builds scheduler when first build in stage was marked as allowed to fail.
Closes #3192
See merge request !2869
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' |