Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pipeline_variable.rb « ci « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d83bb29ff80d356a7e6b518831190375195daff6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

module Ci
  class PipelineVariable < Ci::ApplicationRecord
    include Ci::Partitionable
    include Ci::HasVariable
    include Ci::RawVariable

    belongs_to :pipeline

    self.primary_key = :id
    self.sequence_name = :ci_pipeline_variables_id_seq

    partitionable scope: :pipeline

    alias_attribute :secret_value, :value

    validates :key, :pipeline, presence: true

    def hook_attrs
      { key: key, value: value }
    end
  end
end