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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
cff5eadd
Commit
cff5eadd
authored
Nov 21, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add deployment platform selector
parent
cff4a50e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
app/models/project.rb
app/models/project.rb
+12
-2
No files found.
app/models/project.rb
View file @
cff5eadd
...
...
@@ -123,7 +123,7 @@ class Project < ActiveRecord::Base
has_one
:bugzilla_service
has_one
:gitlab_issue_tracker_service
,
inverse_of: :project
has_one
:external_wiki_service
has_one
:kubernetes_service
,
inverse_of: :project
#
has_one :kubernetes_service, inverse_of: :project
has_one
:prometheus_service
,
inverse_of: :project
has_one
:mock_ci_service
has_one
:mock_deployment_service
...
...
@@ -907,7 +907,17 @@ class Project < ActiveRecord::Base
end
def
deployment_service
@deployment_service
||=
deployment_services
.
reorder
(
nil
).
find_by
(
active:
true
)
deployment_platform
end
def
kubernetes_service
deployment_platform
end
# TODO: This will be extended for multiple enviroment clusters
def
deployment_platform
@deployment_platform
||=
clusters
.
where
(
enabled:
true
).
first
&
.
platform_kubernetes
@deployment_platform
||=
deployment_services
.
reorder
(
nil
).
find_by
(
active:
true
)
end
def
monitoring_services
...
...
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