Class PerJobCacheLocationLocator

All Implemented Interfaces:
ExtensionPoint, Describable<CacheLocationLocator>

public class PerJobCacheLocationLocator extends CacheLocationLocator
Relocates the NPM's default cache to the workspace folder. This allow clean unused packages when the job is gone.
  • Constructor Details

    • PerJobCacheLocationLocator

      @DataBoundConstructor public PerJobCacheLocationLocator()
  • Method Details

    • locate

      public FilePath locate(@NonNull FilePath workspace)
      Description copied from class: CacheLocationLocator
      Called during the build on the master to determine the location of the local cache location.
      Specified by:
      locate in class CacheLocationLocator
      Parameters:
      workspace - the workspace file path locator
      Returns:
      null to let NPM uses its default location. Otherwise this must be located on the same node as described by this path.