diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-01-14 11:59:35 -0600 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-01-22 11:30:43 -0600 |
commit | cfe65a0d3ef23987fbdf21d3a907b1d2980c1f93 (patch) | |
tree | e4293def55379241de86dbfab2756e1ae72ff9de /app | |
parent | 037fddad52e0e74c155da524663e11dd94de0394 (diff) | |
download | gitlab-ce-cfe65a0d3ef23987fbdf21d3a907b1d2980c1f93.tar.gz |
Add domain field into Clusters::Cluster
This is the 1st step for moving Auto DevOps domain into cluster
settings, whether is project or group.
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/52363
Diffstat (limited to 'app')
-rw-r--r-- | app/models/clusters/cluster.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb index 6050955fbd8..a2c48973fa5 100644 --- a/app/models/clusters/cluster.rb +++ b/app/models/clusters/cluster.rb @@ -49,8 +49,9 @@ module Clusters validates :name, cluster_name: true validates :cluster_type, presence: true - validate :restrict_modification, on: :update + validates :domain, allow_nil: true, hostname: { allow_numeric_hostname: true, require_valid_tld: true } + validate :restrict_modification, on: :update validate :no_groups, unless: :group_type? validate :no_projects, unless: :project_type? |