Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbokebilly <fobio@gitlab.com>2017-09-16 16:02:37 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-09-19 16:32:31 +0300
commit3017697701eaecd301edfbc2e4f7c865456f1b0f (patch)
treeb5d4e52c5de0c42929f145607efdb1972d5949fa /app/models/project_auto_devops.rb
parent4c6c105909ea610eac760b05e66d9efc57cbb43c (diff)
Add warning message if domain or cluster are not configured
Diffstat (limited to 'app/models/project_auto_devops.rb')
-rw-r--r--app/models/project_auto_devops.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project_auto_devops.rb b/app/models/project_auto_devops.rb
index 7af3b6870e2..9a52edbff8e 100644
--- a/app/models/project_auto_devops.rb
+++ b/app/models/project_auto_devops.rb
@@ -6,6 +6,10 @@ class ProjectAutoDevops < ActiveRecord::Base
validates :domain, allow_blank: true, hostname: { allow_numeric_hostname: true }
+ def has_domain?
+ domain.present?
+ end
+
def variables
variables = []
variables << { key: 'AUTO_DEVOPS_DOMAIN', value: domain, public: true } if domain.present?