github.com/xgoffin/jenkins-library@v1.154.0/vars/pipelineStashFiles.groovy (about)

     1  import com.sap.piper.GenerateDocumentation
     2  import groovy.transform.Field
     3  
     4  @Field STEP_NAME = getClass().getName()
     5  
     6  @Field Set GENERAL_CONFIG_KEYS = []
     7  
     8  @Field Set STEP_CONFIG_KEYS = []
     9  
    10  @Field Set PARAMETER_KEYS = [
    11      /**
    12       * Can be used to overwrite the default behavior of existing stashes as well as to define additional stashes.
    13       * This parameter handles the _includes_ and can be defined as a map of stash name and include patterns.
    14       * Include pattern has to be a string with comma separated patterns as per [Pipeline basic step `stash`](https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#stash-stash-some-files-to-be-used-later-in-the-build)
    15       */
    16      'stashIncludes',
    17      /**
    18       * Can be used to overwrite the default behavior of existing stashes as well as to define additional stashes.
    19       * This parameter handles the _excludes_ and can be defined as a map of stash name and exclude patterns.
    20       * Exclude pattern has to be a string with comma separated patterns as per [Pipeline basic step `stash`](https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#stash-stash-some-files-to-be-used-later-in-the-build)
    21       */
    22      'stashExcludes'
    23  ]
    24  
    25  /**
    26   * This step stashes files that are needed in other build steps (on other nodes).
    27   */
    28  @GenerateDocumentation
    29  void call(Map parameters = [:], body) {
    30      handlePipelineStepErrors (stepName: 'pipelineStashFiles', stepParameters: parameters) {
    31  
    32          pipelineStashFilesBeforeBuild(parameters)
    33          body() //execute build
    34          pipelineStashFilesAfterBuild(parameters)
    35      }
    36  }