diff options
author | Valery Sizov <valery@gitlab.com> | 2015-01-28 20:10:56 +0000 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-01-28 20:10:56 +0000 |
commit | 9477da8b510a4a40e608c72891d76d4fb0b79978 (patch) | |
tree | e901f3da799860c3f6891fdf918ce8c38156a906 /lib | |
parent | bb045a45235f4258daa2ae9bfb0ae89aba18bade (diff) | |
parent | e8d7d327426138f9ea3737fd77e36ff2ac1299ea (diff) | |
download | gitlab-ci-9477da8b510a4a40e608c72891d76d4fb0b79978.tar.gz |
Merge branch 'tag_list' into 'master'
Allow to receive tag_list from Runner
This enables CI to receive tag_list from Runner's during registration.
Test results are here: https://semaphoreapp.com/ayufan/gitlab-ci/branches/tag_list
This MR requires gitlab-org/gitlab-ci-runner!11
See merge request !32
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/runners.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb index 79d0b56..16abe00 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -33,10 +33,16 @@ module API runner = if params[:token] == GitlabCi::REGISTRATION_TOKEN # Create shared runner. Requires admin access - Runner.create(description: params[:hostname]) + Runner.create( + description: params[:hostname], + tag_list: params[:tag_list] + ) elsif project = Project.find_by(token: params[:token]) # Create a specific runner for project. - project.runners.create(description: params[:hostname]) + project.runners.create( + description: params[:hostname], + tag_list: params[:tag_list] + ) end return forbidden! unless runner |