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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
429 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Ci
class JobVariable < Ci::ApplicationRecord
include Ci::NewHasVariable
include Ci::RawVariable
include BulkInsertSafe
belongs_to :job, class_name: "Ci::Build", foreign_key: :job_id
alias_attribute :secret_value, :value
validates :key, uniqueness: { scope: :job_id }, unless: :dotenv_source?
enum source: { internal: 0, dotenv: 1 }, _suffix: true
end
end