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
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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
runner.rb
app/models/ci/runner.rb
+4
-0
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