diff options
author | bokebilly <fobio@gitlab.com> | 2017-09-16 16:02:37 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-09-19 16:32:31 +0300 |
commit | 3017697701eaecd301edfbc2e4f7c865456f1b0f (patch) | |
tree | b5d4e52c5de0c42929f145607efdb1972d5949fa /app/models/project_auto_devops.rb | |
parent | 4c6c105909ea610eac760b05e66d9efc57cbb43c (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.rb | 4 |
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? |