Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.0 on 2022-01-18 at 14:00 UTC+1 (a few minutes of down time)

Commit 94aad7fe authored by Shinya Maeda's avatar Shinya Maeda
Browse files

Add deployment platform selector

parent e6bdf8e81794
......@@ -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 @@ def deployment_services
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment