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
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2016-02-18 17:28:25 +0300
committerRémy Coutable <remy@rymai.me>2016-02-18 18:18:45 +0300
commitbdbe892ea229e8916f922b168c239db393f3d677 (patch)
treebec7efd4019569ffebf8e3328f9c803e18975c36 /lib
parentfcedf80f467a856f109f6666cf9a72ae3c5295eb (diff)
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.rb4
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'