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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-02 18:09:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-02 18:09:59 +0300
commit1c2ff01b694fd06be15bc20279eef71ee5adf402 (patch)
tree98a588172ab8021790538a515933cf83552c5086 /lib/gitlab/ci/yaml_processor
parent2e4e6e9bb63212c628e67c6865fa39f62217a83d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/yaml_processor')
-rw-r--r--lib/gitlab/ci/yaml_processor/result.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/gitlab/ci/yaml_processor/result.rb b/lib/gitlab/ci/yaml_processor/result.rb
index f96a6629849..460fad16d5c 100644
--- a/lib/gitlab/ci/yaml_processor/result.rb
+++ b/lib/gitlab/ci/yaml_processor/result.rb
@@ -111,6 +111,22 @@ module Gitlab
@ci_config.variables_with_data
end
+ def yaml_variables_for(job_name)
+ job = jobs.fetch(job_name)
+
+ Gitlab::Ci::Variables::Helpers.inherit_yaml_variables(
+ from: root_variables,
+ to: transform_to_yaml_variables(job[:job_variables]),
+ inheritance: job.fetch(:root_variables_inheritance, true)
+ )
+ end
+
+ def stage_for(job_name)
+ job = jobs.fetch(job_name)
+
+ job[:stage]
+ end
+
private
def variables