diff options
author | Valery Sizov <valery@gitlab.com> | 2015-02-04 05:40:00 +0000 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-02-04 05:40:00 +0000 |
commit | 77c5ca246a0990aec80d237a73a70072c2c50bcb (patch) | |
tree | 118fa8a51910532da3475128465d58fa9149fbc9 | |
parent | 78ef4be354be93cc5b9d4a3ecc45408e54fc42ff (diff) | |
parent | 297eef8f53bca912ac2ee679f30fdd494ca570ad (diff) | |
download | gitlab-ci-77c5ca246a0990aec80d237a73a70072c2c50bcb.tar.gz |
Merge branch 'runner_api_description' into 'master'
Rename hostname to description in Runner's API
Continuation of: https://gitlab.com/gitlab-org/gitlab-ci/merge_requests/28
See merge request !34
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | lib/api/runners.rb | 4 | ||||
-rw-r--r-- | spec/requests/api/runners_spec.rb | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -1,7 +1,7 @@ v7.8.0 - Fix OAuth login with GitLab installed in relative URL - GitLab CI has same version as GitLab since now - - Allow to pass hostname and tag list during Runner's registration + - Allow to pass description and tag list during Runner's registration v5.4.2 - Fix exposure of project token via build data diff --git a/lib/api/runners.rb b/lib/api/runners.rb index 16abe00..2a97740 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -34,13 +34,13 @@ module API if params[:token] == GitlabCi::REGISTRATION_TOKEN # Create shared runner. Requires admin access Runner.create( - description: params[:hostname], + description: params[:description], 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], + description: params[:description], tag_list: params[:tag_list] ) end diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb index 71557a3..18c63ea 100644 --- a/spec/requests/api/runners_spec.rb +++ b/spec/requests/api/runners_spec.rb @@ -46,7 +46,7 @@ describe API::API do end describe "should create a runner with description" do - before { post api("/runners/register"), token: GitlabCi::REGISTRATION_TOKEN, hostname: "server.hostname" } + before { post api("/runners/register"), token: GitlabCi::REGISTRATION_TOKEN, description: "server.hostname" } it { response.status.should == 201 } it { Runner.first.description.should == "server.hostname" } |