diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-02 18:09:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-02 18:09:59 +0300 |
commit | 1c2ff01b694fd06be15bc20279eef71ee5adf402 (patch) | |
tree | 98a588172ab8021790538a515933cf83552c5086 /lib/gitlab/ci/yaml_processor | |
parent | 2e4e6e9bb63212c628e67c6865fa39f62217a83d (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.rb | 16 |
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 |