2018-08-03 03:15:25 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-07-26 05:31:09 -04:00
|
|
|
module Ci
|
2021-08-03 02:08:50 -04:00
|
|
|
class PipelineVariable < Ci::ApplicationRecord
|
2020-03-18 08:09:13 -04:00
|
|
|
include Ci::HasVariable
|
2017-07-26 05:31:09 -04:00
|
|
|
|
|
|
|
belongs_to :pipeline
|
|
|
|
|
2018-04-18 11:32:33 -04:00
|
|
|
alias_attribute :secret_value, :value
|
|
|
|
|
2021-09-07 05:11:43 -04:00
|
|
|
validates :key, presence: true
|
2018-10-01 13:22:41 -04:00
|
|
|
|
|
|
|
def hook_attrs
|
|
|
|
{ key: key, value: value }
|
|
|
|
end
|
2017-07-26 05:31:09 -04:00
|
|
|
end
|
|
|
|
end
|