blob: 7af3b6870e22b7c86df6564ed794926f7d5be9fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class ProjectAutoDevops < ActiveRecord::Base
belongs_to :project
scope :enabled, -> { where(enabled: true) }
scope :disabled, -> { where(enabled: false) }
validates :domain, allow_blank: true, hostname: { allow_numeric_hostname: true }
def variables
variables = []
variables << { key: 'AUTO_DEVOPS_DOMAIN', value: domain, public: true } if domain.present?
variables
end
end
|