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:
authorKamil Trzciński <ayufan@ayufan.eu>2019-08-16 17:47:05 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-08-16 17:47:05 +0300
commit535c2d3c71c1cc623958a48f429a88ecaafb2702 (patch)
tree508aa3b90978951b1f8470ac3d7d2101ec64e56a /lib
parent94c7a93dcae1a0e865d11df00ac24add676b636b (diff)
parent16084ee9d3fdfc333a113e4cbcd3f6d2fc402628 (diff)
Merge branch 'mc/feature/pipeline-tracking-config-ce' into 'master'
Add `needs:` CI config option CE Closes gitlab-ee#12334 See merge request gitlab-org/gitlab-ce!31346
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/pipeline/seed/build.rb5
-rw-r--r--lib/gitlab/ci/yaml_processor.rb3
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/ci/pipeline/seed/build.rb b/lib/gitlab/ci/pipeline/seed/build.rb
index b0ce7457926..7ec03d132c0 100644
--- a/lib/gitlab/ci/pipeline/seed/build.rb
+++ b/lib/gitlab/ci/pipeline/seed/build.rb
@@ -57,7 +57,10 @@ module Gitlab
end
def bridge?
- @attributes.to_h.dig(:options, :trigger).present?
+ attributes_hash = @attributes.to_h
+ attributes_hash.dig(:options, :trigger).present? ||
+ (attributes_hash.dig(:options, :bridge_needs).instance_of?(Hash) &&
+ attributes_hash.dig(:options, :bridge_needs, :pipeline).present?)
end
def to_resource
diff --git a/lib/gitlab/ci/yaml_processor.rb b/lib/gitlab/ci/yaml_processor.rb
index 998130e5bd0..2e1eab270ff 100644
--- a/lib/gitlab/ci/yaml_processor.rb
+++ b/lib/gitlab/ci/yaml_processor.rb
@@ -55,7 +55,8 @@ module Gitlab
parallel: job[:parallel],
instance: job[:instance],
start_in: job[:start_in],
- trigger: job[:trigger]
+ trigger: job[:trigger],
+ bridge_needs: job[:needs]
}.compact }.compact
end