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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-01 15:05:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-01 15:05:59 +0300
commit9e27f0d920cc3891fa7644c5cc0bc280c519fb20 (patch)
tree9784dd99270f2009159b19077412bf83d13123a4 /app/models/ci/stage.rb
parent1bab0ba591263cd739af2d2c7c3f1b03678a59b6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/ci/stage.rb')
-rw-r--r--app/models/ci/stage.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb
index d90339d90dc..77ac8bfe875 100644
--- a/app/models/ci/stage.rb
+++ b/app/models/ci/stage.rb
@@ -78,7 +78,8 @@ module Ci
def update_status
retry_optimistic_lock(self) do
- case statuses.latest.status
+ new_status = latest_stage_status.to_s
+ case new_status
when 'created' then nil
when 'preparing' then prepare
when 'pending' then enqueue
@@ -91,7 +92,7 @@ module Ci
when 'skipped', nil then skip
else
raise HasStatus::UnknownStatusError,
- "Unknown status `#{statuses.latest.status}`"
+ "Unknown status `#{new_status}`"
end
end
end
@@ -124,5 +125,9 @@ module Ci
def manual_playable?
blocked? || skipped?
end
+
+ def latest_stage_status
+ statuses.latest.slow_composite_status || 'skipped'
+ end
end
end