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/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-04-05 15:07:12 +0300
committerJames Lopez <james@jameslopez.es>2017-04-10 09:58:32 +0300
commit894817fcc9046d03e2d3456b6a52b59e6facfecf (patch)
tree111750bf0013041b9c9f10a0037a3fa4bfb59566 /app
parent183f2b9bc1bc00093a0ac6e5240b918adc8c3a6c (diff)
Merge branch 'gitlab-ci-multi-runner-2284' into 'master'
Return an empty array when dependencies is an empty array Closes #30316 and gitlab-ci-multi-runner#2284 See merge request !10359
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index ad0be70c32a..8431c5f228c 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -540,6 +540,8 @@ module Ci
end
def dependencies
+ return [] if empty_dependencies?
+
depended_jobs = depends_on_builds
return depended_jobs unless options[:dependencies].present?
@@ -549,6 +551,10 @@ module Ci
end
end
+ def empty_dependencies?
+ options[:dependencies]&.empty?
+ end
+
private
def update_artifacts_size