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 : long
  • caches
      Array / List of Nested Choice of Objects
    • $class: 'ArbitraryFileCache'
      Caches arbitrary paths on the executor back to the item storage cache.
      • path : String
        The path to cache. It can be absolute or relative to the workspace.
      • includes : String
        The pattern to match files that should be included in caching
      • excludes : String
        The pattern to match files that should be excluded from caching
      • cacheValidityDecidingFile : String (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.
      • compressionMethod (optional)
        The compression method to use
        • Values: NONE, ZIP, TARGZ
      • useDefaultExcludes : boolean (optional)
        Whether to use default excludes (see DirectoryScanner#DEFAULTEXCLUDES for more details).
  • defaultBranch : String (optional)

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 : long
  • caches
      Array / List of Nested Choice of Objects
    • $class: 'ArbitraryFileCache'
      Caches arbitrary paths on the executor back to the item storage cache.
      • path : String
        The path to cache. It can be absolute or relative to the workspace.
      • includes : String
        The pattern to match files that should be included in caching
      • excludes : String
        The pattern to match files that should be excluded from caching
      • cacheValidityDecidingFile : String (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.
      • compressionMethod (optional)
        The compression method to use
        • Values: NONE, ZIP, TARGZ
      • useDefaultExcludes : boolean (optional)
        Whether to use default excludes (see DirectoryScanner#DEFAULTEXCLUDES for more details).
  • defaultBranch : String (optional)

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.