debian-mirror-gitlab/app/models/ci/job_variable.rb
2023-05-27 22:25:52 +05:30

20 lines
518 B
Ruby

# 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, inverse_of: :job_variables
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