summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/config/node/cache.rb
blob: b4bda2841ac467ec9c3751d0ab5c82beaee3c294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module Gitlab
  module Ci
    class Config
      module Node
        ##
        # Entry that represents a cache configuration
        #
        class Cache < Entry
          include Configurable

          ALLOWED_KEYS = %i[key untracked paths]

          validations do
            validates :config, allowed_keys: ALLOWED_KEYS
          end

          node :key, Node::Key,
            description: 'Cache key used to define a cache affinity.'

          node :untracked, Node::Boolean,
            description: 'Cache all untracked files.'

          node :paths, Node::Paths,
            description: 'Specify which paths should be cached across builds.'
        end
      end
    end
  end
end