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
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/git/base_hooks_service.rb')
-rw-r--r--app/services/git/base_hooks_service.rb26
1 files changed, 16 insertions, 10 deletions
diff --git a/app/services/git/base_hooks_service.rb b/app/services/git/base_hooks_service.rb
index a49983a84fc..ea5b2f401b3 100644
--- a/app/services/git/base_hooks_service.rb
+++ b/app/services/git/base_hooks_service.rb
@@ -81,15 +81,17 @@ module Git
end
def pipeline_params
- {
- before: oldrev,
- after: newrev,
- ref: ref,
- variables_attributes: generate_vars_from_push_options || [],
- push_options: params[:push_options] || {},
- checkout_sha: Gitlab::DataBuilder::Push.checkout_sha(
- project.repository, newrev, ref)
- }
+ strong_memoize(:pipeline_params) do
+ {
+ before: oldrev,
+ after: newrev,
+ ref: ref,
+ variables_attributes: generate_vars_from_push_options || [],
+ push_options: params[:push_options] || {},
+ checkout_sha: Gitlab::DataBuilder::Push.checkout_sha(
+ project.repository, newrev, ref)
+ }
+ end
end
def ci_variables_from_push_options
@@ -156,12 +158,16 @@ module Git
project_path: project.full_path,
message: "Error creating pipeline",
errors: exception.to_s,
- pipeline_params: pipeline_params
+ pipeline_params: sanitized_pipeline_params
}
logger.warn(data)
end
+ def sanitized_pipeline_params
+ pipeline_params.except(:push_options)
+ end
+
def logger
if Gitlab::Runtime.sidekiq?
Sidekiq.logger