diff options
Diffstat (limited to 'lib/gitlab/ci/config/entry/cache.rb')
-rw-r--r-- | lib/gitlab/ci/config/entry/cache.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/gitlab/ci/config/entry/cache.rb b/lib/gitlab/ci/config/entry/cache.rb new file mode 100644 index 00000000000..7653cab668b --- /dev/null +++ b/lib/gitlab/ci/config/entry/cache.rb @@ -0,0 +1,29 @@ +module Gitlab + module Ci + class Config + module Entry + ## + # Entry that represents a cache configuration + # + class Cache < Node + include Configurable + + ALLOWED_KEYS = %i[key untracked paths] + + 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 |