BigW Consortium Gitlab

cache.rb 705 Bytes
Newer Older
1 2 3
module Gitlab
  module Ci
    class Config
4
      module Entry
5 6 7
        ##
        # Entry that represents a cache configuration
        #
8
        class Cache < Node
9 10
          include Configurable

11 12
          ALLOWED_KEYS = %i[key untracked paths]

13
          validations do
14
            validates :config, allowed_keys: ALLOWED_KEYS
15 16
          end

17
          entry :key, Entry::Key,
18 19
            description: 'Cache key used to define a cache affinity.'

20
          entry :untracked, Entry::Boolean,
21 22
            description: 'Cache all untracked files.'

23
          entry :paths, Entry::Paths,
24
            description: 'Specify which paths should be cached across builds.'
25 26 27 28 29
        end
      end
    end
  end
end