Skip to content
Snippets Groups Projects
Commit 77c5ca24 authored by Valery Sizov's avatar Valery Sizov
Browse files

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
parents 78ef4be3 297eef8f
No related branches found
No related tags found
No related merge requests found
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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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" }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment