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:
authorRémy Coutable <remy@rymai.me>2016-06-16 14:48:36 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-06-16 20:28:06 +0300
commit700a88a876f6c99217ed5263e26f48669e1a06be (patch)
treea4c6053786e40a254c506ab575324e100132e41d /lib
parentaafbfb0009b62843dba2d433e580da2a154ba49d (diff)
Merge branch 'fix/status-of-pipeline-without-builds' into 'master'
Improve pipeline status in case that pipeline has no jobs ## What does this MR do? This MR resolves problem with pipeline status when there are no build in pipeline. This can happen when builds were skipped - for example - by using `only`/`except` keyword in `.gitlab-ci.yml`. ## What are the relevant issue numbers? Closes #17977 See merge request !4403
Diffstat (limited to 'lib')
-rw-r--r--lib/ci/gitlab_ci_yaml_processor.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb
index 68246497e90..a66602f9194 100644
--- a/lib/ci/gitlab_ci_yaml_processor.rb
+++ b/lib/ci/gitlab_ci_yaml_processor.rb
@@ -30,7 +30,10 @@ module Ci
end
def builds_for_stage_and_ref(stage, ref, tag = false, trigger_request = nil)
- builds.select{|build| build[:stage] == stage && process?(build[:only], build[:except], ref, tag, trigger_request)}
+ builds.select do |build|
+ build[:stage] == stage &&
+ process?(build[:only], build[:except], ref, tag, trigger_request)
+ end
end
def builds