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:
authorMatija Čupić <matteeyah@gmail.com>2019-07-29 10:43:10 +0300
committerPhil Hughes <me@iamphill.com>2019-07-29 10:43:10 +0300
commita5aa40c5fe93dc3daba8a578f4c09c4e443fcbec (patch)
tree34eb74d209b1919f78ce70d89ee0900cd2602780 /spec/services/ci/play_build_service_spec.rb
parent946f7c0687760ec49aca582a329d0ec3c7ac3037 (diff)
Add Job specific variables
Adds Job specific variables to facilitate specifying variables when running manual jobs.
Diffstat (limited to 'spec/services/ci/play_build_service_spec.rb')
-rw-r--r--spec/services/ci/play_build_service_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/services/ci/play_build_service_spec.rb b/spec/services/ci/play_build_service_spec.rb
index 1e68b7956ea..cf39f3da4fe 100644
--- a/spec/services/ci/play_build_service_spec.rb
+++ b/spec/services/ci/play_build_service_spec.rb
@@ -60,6 +60,19 @@ describe Ci::PlayBuildService, '#execute' do
expect(build.reload.user).to eq user
end
+
+ context 'when variables are supplied' do
+ let(:job_variables) do
+ [{ key: 'first', secret_value: 'first' },
+ { key: 'second', secret_value: 'second' }]
+ end
+
+ it 'assigns the variables to the build' do
+ service.execute(build, job_variables)
+
+ expect(build.reload.job_variables.map(&:key)).to contain_exactly('first', 'second')
+ end
+ end
end
context 'when build is not a playable manual action' do