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

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

module Ci
  class JobVariable < Ci::ApplicationRecord
    include Ci::Partitionable
    include Ci::NewHasVariable
    include Ci::RawVariable
    include BulkInsertSafe

    belongs_to :job, class_name: "Ci::Build", foreign_key: :job_id

    partitionable scope: :job

    alias_attribute :secret_value, :value

    validates :key, uniqueness: { scope: :job_id }, unless: :dotenv_source?

    enum source: { internal: 0, dotenv: 1 }, _suffix: true
  end
end