The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Job Cacher plugin

cache: Caches files from previous build to current build

  • maxCacheSize
    • Type: long
  • caches
      Array / List of Nested Choice of Objects
    • $class: 'ArbitraryFileCache'
      Caches arbitrary paths on the executor back to the item storage cache.
      • path
        The path to cache. It can be absolute or relative to the workspace.
        • Type: String
      • includes
        The pattern to match files that should be included in caching
        • Type: String
      • excludes
        The pattern to match files that should be excluded from caching
        • Type: String
      • cacheValidityDecidingFile (optional)
        The workspace-relative path to a file which should be used to determine whether the cache is up-to-date or not. Only up-to-date caches will be restored and only outdated caches will be created.
        • Type: String
      • compressionMethod (optional)
        The compression method to use
        • Values: NONE, ZIP, TARGZ
      • useDefaultExcludes (optional)
        Whether to use default excludes (see DirectoryScanner#DEFAULTEXCLUDES for more details).
        • Type: boolean
  • defaultBranch (optional)
    • Type: String

wrap([$class: 'CacheWrapper']): Job Cacher

Enable caching of files on the executor so that subsequent builds do not need to recreate the files. This is helpful for executors that start clean each time such as docker containers.
  • maxCacheSize
    • Type: long
  • caches
      Array / List of Nested Choice of Objects
    • $class: 'ArbitraryFileCache'
      Caches arbitrary paths on the executor back to the item storage cache.
      • path
        The path to cache. It can be absolute or relative to the workspace.
        • Type: String
      • includes
        The pattern to match files that should be included in caching
        • Type: String
      • excludes
        The pattern to match files that should be excluded from caching
        • Type: String
      • cacheValidityDecidingFile (optional)
        The workspace-relative path to a file which should be used to determine whether the cache is up-to-date or not. Only up-to-date caches will be restored and only outdated caches will be created.
        • Type: String
      • compressionMethod (optional)
        The compression method to use
        • Values: NONE, ZIP, TARGZ
      • useDefaultExcludes (optional)
        Whether to use default excludes (see DirectoryScanner#DEFAULTEXCLUDES for more details).
        • Type: boolean
  • defaultBranch (optional)
    • Type: String

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.