2017-08-24 07:01:33 -04:00
|
|
|
class ProjectAutoDevops < ActiveRecord::Base
|
|
|
|
belongs_to :project
|
2017-09-04 09:44:46 -04:00
|
|
|
|
2017-09-06 15:00:34 -04:00
|
|
|
validates :domain, allow_blank: true, hostname: { allow_numeric_hostname: true }
|
2017-09-06 12:57:07 -04:00
|
|
|
|
|
|
|
def variables
|
|
|
|
variables = []
|
|
|
|
variables << { key: 'AUTO_DEVOPS_DOMAIN', value: domain, public: true } if domain.present?
|
|
|
|
variables
|
|
|
|
end
|
2017-08-24 07:01:33 -04:00
|
|
|
end
|