BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1ee83819
Commit
1ee83819
authored
Feb 04, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to tick the queue when creating the runner
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8664/diffs#note_22190504
parent
985c68a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
runners.rb
lib/ci/api/runners.rb
+8
-12
No files found.
lib/ci/api/runners.rb
View file @
1ee83819
...
...
@@ -28,27 +28,23 @@ module Ci
post
"register"
do
required_attributes!
[
:token
]
project
=
nil
attributes
=
attributes_for_keys
(
[
:description
,
:tag_list
,
:run_untagged
,
:locked
]
)
runner
=
if
runner_registration_token_valid?
# Create shared runner. Requires admin access
Ci
::
Runner
.
new
(
is_shared:
true
)
Ci
::
Runner
.
create
(
attributes
.
merge
(
is_shared:
true
)
)
elsif
project
=
Project
.
find_by
(
runners_token:
params
[
:token
])
Ci
::
Runner
.
new
# Create a specific runner for project.
project
.
runners
.
create
(
attributes
)
end
return
forbidden!
unless
runner
attributes
=
attributes_for_keys
(
[
:description
,
:tag_list
,
:run_untagged
,
:locked
]
).
merge
(
get_runner_version_from_params
||
{})
Ci
::
UpdateRunnerService
.
new
(
runner
).
update
(
attributes
)
# Assign the specific runner for the project
project
.
runners
<<
runner
if
project
if
runner
.
id
runner
.
update
(
get_runner_version_from_params
)
present
runner
,
with:
Entities
::
Runner
else
not_found!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment