diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-06-27 16:55:27 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-07-05 18:36:18 +0900 |
commit | 51730b3a15ce03bd5de83a978647059ad182378c (patch) | |
tree | 0a3484f7930463fb008324d7cecb3f7922e3a084 /app | |
parent | a7c4673eb7e67202816e00d76148559d45441184 (diff) | |
download | gitlab-ce-51730b3a15ce03bd5de83a978647059ad182378c.tar.gz |
zj nice catches
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/build.rb | 2 | ||||
-rw-r--r-- | app/models/ci/pipeline_schedule.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index e23f7279d5a..cc8d940080c 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -196,7 +196,7 @@ module Ci variables += user_variables variables += project.secret_variables_for(ref).map(&:to_runner_variable) variables += trigger_request&.user_variables || [] - variables += pipeline.pipeline_schedule&.variables&.map(&:to_runner_variable) || [] + variables += pipeline.pipeline_schedule&.job_variables variables end diff --git a/app/models/ci/pipeline_schedule.rb b/app/models/ci/pipeline_schedule.rb index 440d9717fc8..df9df45edb0 100644 --- a/app/models/ci/pipeline_schedule.rb +++ b/app/models/ci/pipeline_schedule.rb @@ -59,5 +59,9 @@ module Ci Gitlab::Ci::CronParser.new(worker_cron, worker_time_zone) .next_time_from(next_run_at) end + + def job_variables + variables&.map(&:to_runner_variable) || [] + end end end |