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