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 'lib/gitlab/ci/config.rb')
-rw-r--r--lib/gitlab/ci/config.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config.rb b/lib/gitlab/ci/config.rb
index 4c98941e032..2b190d89fa4 100644
--- a/lib/gitlab/ci/config.rb
+++ b/lib/gitlab/ci/config.rb
@@ -158,7 +158,7 @@ module Gitlab
# See more detail in the docs: https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
variables.concat(project.predefined_variables)
variables.concat(pipeline.predefined_variables) if pipeline
- variables.concat(project.ci_instance_variables_for(ref: source_ref_path))
+ variables.concat(secret_variables(project: project, pipeline: pipeline))
variables.concat(project.group.ci_variables_for(source_ref_path, project)) if project.group
variables.concat(project.ci_variables_for(ref: source_ref_path))
variables.concat(pipeline.variables) if pipeline
@@ -166,6 +166,14 @@ module Gitlab
end
end
+ def secret_variables(project:, pipeline:)
+ if pipeline
+ pipeline.variables_builder.secret_instance_variables
+ else
+ Gitlab::Ci::Variables::Builder::Instance.new.secret_variables
+ end
+ end
+
def track_and_raise_for_dev_exception(error)
Gitlab::ErrorTracking.track_and_raise_for_dev_exception(error, @context.sentry_payload)
end