diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-01-04 22:35:41 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-01-04 22:35:41 +0000 |
commit | 93e9793ce38bb9b5d519f5ca86cb56201549ef19 (patch) | |
tree | 82087bc1aae9f01eea1f908bbfefe71514741a5b /app/models/service.rb | |
parent | 6f1b4dc76b4619f538b7216ad3a10ca9336d0c2b (diff) | |
download | gitlab-ce-93e9793ce38bb9b5d519f5ca86cb56201549ef19.tar.gz |
Create Kubernetes based on Application Templates
Diffstat (limited to 'app/models/service.rb')
-rw-r--r-- | app/models/service.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/service.rb b/app/models/service.rb index 176b472e724..24ba3039707 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -44,6 +44,7 @@ class Service < ActiveRecord::Base scope :pipeline_hooks, -> { where(pipeline_events: true, active: true) } scope :wiki_page_hooks, -> { where(wiki_page_events: true, active: true) } scope :external_issue_trackers, -> { issue_trackers.active.without_defaults } + scope :deployment, -> { where(category: 'deployment') } default_value_for :category, 'common' @@ -271,6 +272,10 @@ class Service < ActiveRecord::Base nil end + def self.find_by_template + find_by(template: true) + end + private def cache_project_has_external_issue_tracker |