gitlab-org--gitlab-foss/lib/gitlab/ci/config/entry/cache.rb

30 lines
712 B
Ruby
Raw Normal View History

module Gitlab
module Ci
class Config
module Entry
##
# Entry that represents a cache configuration
#
class Cache < Node
include Configurable
2017-02-21 23:32:18 +00:00
ALLOWED_KEYS = %i[key untracked paths].freeze
validations do
validates :config, allowed_keys: ALLOWED_KEYS
end
entry :key, Entry::Key,
description: 'Cache key used to define a cache affinity.'
entry :untracked, Entry::Boolean,
description: 'Cache all untracked files.'
entry :paths, Entry::Paths,
description: 'Specify which paths should be cached across builds.'
end
end
end
end
end