debian-mirror-gitlab/app/models/ci/job_variable.rb

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

21 lines
490 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
module Ci
2021-10-27 15:23:28 +05:30
class JobVariable < Ci::ApplicationRecord
2023-03-04 22:38:38 +05:30
include Ci::Partitionable
2020-04-22 19:07:51 +05:30
include Ci::NewHasVariable
2023-01-13 00:05:48 +05:30
include Ci::RawVariable
2020-04-08 14:13:33 +05:30
include BulkInsertSafe
2019-10-12 21:52:04 +05:30
belongs_to :job, class_name: "Ci::Build", foreign_key: :job_id
2023-03-04 22:38:38 +05:30
partitionable scope: :job
2019-10-12 21:52:04 +05:30
alias_attribute :secret_value, :value
2020-04-08 14:13:33 +05:30
validates :key, uniqueness: { scope: :job_id }, unless: :dotenv_source?
enum source: { internal: 0, dotenv: 1 }, _suffix: true
2019-10-12 21:52:04 +05:30
end
end