summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-06-27 16:55:27 +0900
committerShinya Maeda <shinya@gitlab.com>2017-07-05 18:38:27 +0900
commitd65d66e08bf62491fc4a3da322d36dfb9014eaac (patch)
tree1f49f6e9fbf7cb10f984ccafdb59fa15cd267e22 /app
parentcfd5caa5e7d546436b82d94468defc0638270435 (diff)
downloadgitlab-ce-d65d66e08bf62491fc4a3da322d36dfb9014eaac.tar.gz
zj nice catches
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb2
-rw-r--r--app/models/ci/pipeline_schedule.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 12bc961ec87..ac5c2bf00ae 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -193,7 +193,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