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