diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 21:08:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 21:08:16 +0300 |
commit | e9c2bf267862e22c0770cc7b3a1ed97a8b87a7fd (patch) | |
tree | 7b778e44f210132af1233ceb8801b388ac3519f5 /app/models/ci | |
parent | 946771d0b016ae92b15a60bc3290a33b94191ffe (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/ci')
-rw-r--r-- | app/models/ci/bridge.rb | 4 | ||||
-rw-r--r-- | app/models/ci/pipeline.rb | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/models/ci/bridge.rb b/app/models/ci/bridge.rb index 39be26abc1d..a28e44d44c1 100644 --- a/app/models/ci/bridge.rb +++ b/app/models/ci/bridge.rb @@ -62,6 +62,10 @@ module Ci end end + def has_downstream_pipeline? + sourced_pipelines.exists? + end + def downstream_pipeline_params return child_params if triggers_child_pipeline? return cross_project_params if downstream_project.present? diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index e07abc20dcf..ff257c6cd68 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -227,6 +227,7 @@ module Ci end after_transition created: :pending do |pipeline| + next if Feature.enabled?(:ci_drop_bridge_on_downstream_errors, pipeline.project, default_enabled: true) next unless pipeline.bridge_triggered? next if pipeline.bridge_waiting? @@ -756,6 +757,8 @@ module Ci raise BridgeStatusError unless source_bridge.active? source_bridge.success! + rescue => e + Gitlab::ErrorTracking.track_exception(e, pipeline_id: id) end def bridge_triggered? @@ -774,6 +777,10 @@ module Ci child_pipelines.exists? end + def created_successfully? + persisted? && failure_reason.blank? + end + def detailed_status(current_user) Gitlab::Ci::Status::Pipeline::Factory .new(self, current_user) |