Class CacheStep

  • All Implemented Interfaces:
    ExtensionPoint, Describable<org.jenkinsci.plugins.workflow.steps.Step>

    public class CacheStep
    extends org.jenkinsci.plugins.workflow.steps.Step
    Wrapping workflow step that automatically seeds the specified path with the previous run and on exit of the block, saves that cache to the configured item storage.
    • Constructor Detail

      • CacheStep

        @DataBoundConstructor
        public CacheStep​(Long maxCacheSize,
                         List<Cache> caches)
    • Method Detail

      • setDefaultBranch

        @DataBoundSetter
        public void setDefaultBranch​(String defaultBranch)
      • getDefaultBranch

        public String getDefaultBranch()
      • setMaxCacheSize

        @DataBoundSetter
        public void setMaxCacheSize​(Long maxCacheSize)
      • getMaxCacheSize

        public Long getMaxCacheSize()
      • setSkipSave

        @DataBoundSetter
        public void setSkipSave​(boolean skipSave)
      • getSkipSave

        public boolean getSkipSave()
      • setSkipRestore

        @DataBoundSetter
        public void setSkipRestore​(boolean skipRestore)
      • getSkipRestore

        public boolean getSkipRestore()
      • start

        public org.jenkinsci.plugins.workflow.steps.StepExecution start​(org.jenkinsci.plugins.workflow.steps.StepContext context)
                                                                 throws Exception
        Specified by:
        start in class org.jenkinsci.plugins.workflow.steps.Step
        Throws:
        Exception