diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /lib/gitlab/ci/config.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'lib/gitlab/ci/config.rb')
-rw-r--r-- | lib/gitlab/ci/config.rb | 10 |
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 |