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
ae992c6a
Commit
ae992c6a
authored
May 09, 2018
by
Grzegorz Bizon
Committed by
Filipa Lacerda
May 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'add-runner-type-to-cluster-app' into 'master'
Set `runner_type` for cluster/application See merge request gitlab-org/gitlab-ce!18832
parent
7c3c0685
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
runner.rb
app/models/clusters/applications/runner.rb
+9
-1
runner_spec.rb
spec/models/clusters/applications/runner_spec.rb
+1
-2
No files found.
app/models/clusters/applications/runner.rb
View file @
ae992c6a
...
...
@@ -43,12 +43,20 @@ module Clusters
def
create_and_assign_runner
transaction
do
project
.
runners
.
create!
(
name:
'kubernetes-cluster'
,
tag_list:
%w(kubernetes cluster)
).
tap
do
|
runner
|
project
.
runners
.
create!
(
runner_create_params
).
tap
do
|
runner
|
update!
(
runner_id:
runner
.
id
)
end
end
end
def
runner_create_params
{
name:
'kubernetes-cluster'
,
runner_type: :project_type
,
tag_list:
%w(kubernetes cluster)
}
end
def
gitlab_url
Gitlab
::
Routing
.
url_helpers
.
root_url
(
only_path:
false
)
end
...
...
spec/models/clusters/applications/runner_spec.rb
View file @
ae992c6a
...
...
@@ -74,9 +74,8 @@ describe Clusters::Applications::Runner do
it
'assigns the new runner to runner'
do
subject
gitlab_runner
.
reload
expect
(
gitlab_runner
.
r
unner
).
not_to
be_nil
expect
(
gitlab_runner
.
r
eload
.
runner
).
to
be_project_type
end
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