diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-08 18:10:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-08 18:10:26 +0300 |
commit | 9f9dc2bc412632e6b459d0bb9e1ac205c8cf34af (patch) | |
tree | caafa909017726a087ae4e4bdaeb558ac2c04a9b /lib/gitlab/ci/variables | |
parent | 88bacc889f129f8d95af34f1781dd66769ec27cc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci/variables')
-rw-r--r-- | lib/gitlab/ci/variables/builder.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/gitlab/ci/variables/builder.rb b/lib/gitlab/ci/variables/builder.rb index 33a1948b79d..f16abf6cf49 100644 --- a/lib/gitlab/ci/variables/builder.rb +++ b/lib/gitlab/ci/variables/builder.rb @@ -28,7 +28,7 @@ module Gitlab variables.concat(secret_project_variables(environment: environment)) variables.concat(job.trigger_request.user_variables) if job.trigger_request variables.concat(pipeline.variables) - variables.concat(pipeline.pipeline_schedule.job_variables) if pipeline.pipeline_schedule + variables.concat(pipeline_schedule_variables) end end @@ -120,6 +120,18 @@ module Gitlab end end + def pipeline_schedule_variables + strong_memoize(:pipeline_schedule_variables) do + variables = if pipeline.pipeline_schedule + pipeline.pipeline_schedule.job_variables + else + [] + end + + Gitlab::Ci::Variables::Collection.new(variables) + end + end + def ci_node_total_value(job) parallel = job.options&.dig(:parallel) parallel = parallel.dig(:total) if parallel.is_a?(Hash) |