summaryrefslogtreecommitdiff
path: root/app/models/ci/build.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-27 15:06:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-27 15:06:45 +0000
commita98649b71085bcd21af674a47d6a746336c56a65 (patch)
tree1e518ce4f61a8d7260ba9d6d3b8db8906251d6a0 /app/models/ci/build.rb
parenta4484fd22dd0d055a10fe084b82349e42f7363e1 (diff)
downloadgitlab-ce-a98649b71085bcd21af674a47d6a746336c56a65.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 4679e8b74d7..7d3cb62e4ee 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -764,7 +764,7 @@ module Ci
# find all jobs that are needed
if Feature.enabled?(:ci_dag_support, project, default_enabled: true) && needs.exists?
- depended_jobs = depended_jobs.where(name: needs.select(:name))
+ depended_jobs = depended_jobs.where(name: needs.artifacts.select(:name))
end
# find all jobs that are dependent on
@@ -772,6 +772,8 @@ module Ci
depended_jobs = depended_jobs.where(name: options[:dependencies])
end
+ # if both needs and dependencies are used,
+ # the end result will be an intersection between them
depended_jobs
end