summaryrefslogtreecommitdiff
path: root/app/models/ci/pipeline.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r--app/models/ci/pipeline.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index aa23b5cf97c..d14825c082a 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -104,6 +104,10 @@ module Ci
statuses.select(:stage).distinct.count
end
+ def stages_name
+ statuses.order(:stage_idx).distinct.pluck(:stage)
+ end
+
def stages
status_sql = statuses.latest.where('stage=sg.stage').status_sql