2019-04-02 10:13:27 +02:00
|
|
|
import com.sap.piper.GenerateDocumentation
|
2018-10-09 17:09:55 +02:00
|
|
|
import groovy.transform.Field
|
|
|
|
|
2018-11-29 10:54:05 +02:00
|
|
|
@Field STEP_NAME = getClass().getName()
|
2018-10-09 17:09:55 +02:00
|
|
|
|
2019-04-02 10:13:27 +02:00
|
|
|
@Field Set GENERAL_CONFIG_KEYS = []
|
|
|
|
|
|
|
|
@Field Set STEP_CONFIG_KEYS = []
|
|
|
|
|
|
|
|
@Field Set PARAMETER_KEYS = [
|
|
|
|
/**
|
|
|
|
* Can be used to overwrite the default behavior of existing stashes as well as to define additional stashes.
|
|
|
|
* This parameter handles the _includes_ and can be defined as a map of stash name and include patterns.
|
|
|
|
* 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)
|
|
|
|
*/
|
|
|
|
'stashIncludes',
|
|
|
|
/**
|
|
|
|
* Can be used to overwrite the default behavior of existing stashes as well as to define additional stashes.
|
|
|
|
* This parameter handles the _excludes_ and can be defined as a map of stash name and exclude patterns.
|
|
|
|
* 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)
|
|
|
|
*/
|
|
|
|
'stashExcludes'
|
|
|
|
]
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This step stashes files that are needed in other build steps (on other nodes).
|
|
|
|
*/
|
|
|
|
@GenerateDocumentation
|
2018-08-30 16:33:07 +02:00
|
|
|
void call(Map parameters = [:], body) {
|
2018-05-30 12:00:13 +02:00
|
|
|
handlePipelineStepErrors (stepName: 'pipelineStashFiles', stepParameters: parameters) {
|
2018-09-21 16:55:31 +02:00
|
|
|
|
2018-05-30 12:00:13 +02:00
|
|
|
pipelineStashFilesBeforeBuild(parameters)
|
|
|
|
body() //execute build
|
|
|
|
pipelineStashFilesAfterBuild(parameters)
|
|
|
|
}
|
|
|
|
}
|