Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
84fa0610
Commit
84fa0610
authored
May 10, 2018
by
Dylan Griffith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure runner_type is updated correctly when assigning shared runner to project
parent
063b6b75
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
app/models/ci/runner.rb
app/models/ci/runner.rb
+5
-1
spec/models/ci/runner_spec.rb
spec/models/ci/runner_spec.rb
+1
-0
No files found.
app/models/ci/runner.rb
View file @
84fa0610
...
...
@@ -108,7 +108,11 @@ module Ci
end
def
assign_to
(
project
,
current_user
=
nil
)
if
shared?
self
.
is_shared
=
false
if
shared?
self
.
runner_type
=
:project_type
end
self
.
save
project
.
runner_projects
.
create
(
runner_id:
self
.
id
)
end
...
...
spec/models/ci/runner_spec.rb
View file @
84fa0610
...
...
@@ -207,6 +207,7 @@ describe Ci::Runner do
end
it
{
expect
(
shared_runner
).
to
be_specific
}
it
{
expect
(
shared_runner
).
to
be_project_type
}
it
{
expect
(
shared_runner
.
projects
).
to
eq
([
project
])
}
it
{
expect
(
shared_runner
.
only_for?
(
project
)).
to
be_truthy
}
end
...
...
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