diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-06 14:49:37 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-12-06 16:04:30 +0100 |
commit | 953a10947bea8ff75290cd50fae4ae1f7636a71d (patch) | |
tree | 060ae96378341519786aa236050c110a246047ae /app/models/ci/pipeline.rb | |
parent | 401c155e16e4966be538fd14f23e268cd3383aa7 (diff) | |
download | gitlab-ce-953a10947bea8ff75290cd50fae4ae1f7636a71d.tar.gz |
Added Ci::Stage specs
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r-- | app/models/ci/pipeline.rb | 4 |
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 |