diff options
Diffstat (limited to 'app/models/concerns/ci/contextable.rb')
-rw-r--r-- | app/models/concerns/ci/contextable.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/app/models/concerns/ci/contextable.rb b/app/models/concerns/ci/contextable.rb index a9589cea5e9..12ddbc2cc40 100644 --- a/app/models/concerns/ci/contextable.rb +++ b/app/models/concerns/ci/contextable.rb @@ -13,7 +13,6 @@ module Ci track_duration do variables = pipeline.variables_builder.scoped_variables(self, environment: environment, dependencies: dependencies) - variables.concat(predefined_variables) unless pipeline.predefined_vars_in_builder_enabled? variables.concat(project.predefined_variables) variables.concat(pipeline.predefined_variables) variables.concat(runner.predefined_variables) if runnable? && runner @@ -71,24 +70,6 @@ module Ci end end - def predefined_variables - Gitlab::Ci::Variables::Collection.new.tap do |variables| - variables.append(key: 'CI_JOB_NAME', value: name) - variables.append(key: 'CI_JOB_STAGE', value: stage) - variables.append(key: 'CI_JOB_MANUAL', value: 'true') if action? - variables.append(key: 'CI_PIPELINE_TRIGGERED', value: 'true') if trigger_request - - variables.append(key: 'CI_NODE_INDEX', value: self.options[:instance].to_s) if self.options&.include?(:instance) - variables.append(key: 'CI_NODE_TOTAL', value: ci_node_total_value.to_s) - - # legacy variables - variables.append(key: 'CI_BUILD_NAME', value: name) - variables.append(key: 'CI_BUILD_STAGE', value: stage) - variables.append(key: 'CI_BUILD_TRIGGERED', value: 'true') if trigger_request - variables.append(key: 'CI_BUILD_MANUAL', value: 'true') if action? - end - end - def kubernetes_variables ::Gitlab::Ci::Variables::Collection.new.tap do |collection| # Should get merged with the cluster kubeconfig in deployment_variables, see @@ -123,13 +104,5 @@ module Ci def secret_project_variables(environment: expanded_environment_name) project.ci_variables_for(ref: git_ref, environment: environment) end - - private - - def ci_node_total_value - parallel = self.options&.dig(:parallel) - parallel = parallel.dig(:total) if parallel.is_a?(Hash) - parallel || 1 - end end end |