gitlab-org--gitlab-foss/app/models/ci/pipeline_variable.rb

19 lines
336 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-07-26 05:31:09 -04:00
module Ci
class PipelineVariable < ApplicationRecord
extend Gitlab::Ci::Model
2017-07-26 05:31:09 -04:00
include HasVariable
belongs_to :pipeline
alias_attribute :secret_value, :value
2017-07-26 05:31:09 -04:00
validates :key, uniqueness: { scope: :pipeline_id }
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