diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-07 00:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-07 00:08:48 +0300 |
commit | a89cb5cbdd832d4d9e80517973aceda6bc0a3856 (patch) | |
tree | 574475bd0901a2f8906d36a4728b8bbb95b41e1c /app/services/git | |
parent | 0d6fa033121a9bef708b8f2de186c4034c61d4a3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/git')
-rw-r--r-- | app/services/git/base_hooks_service.rb | 26 |
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 |