gitlab-org--gitlab-foss/app/models/project_auto_devops.rb
2017-09-06 21:00:34 +02:00

11 lines
306 B
Ruby

class ProjectAutoDevops < ActiveRecord::Base
belongs_to :project
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