mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
Merge pull request #629 from alejandraferreirovidal/pipelineStashFiles
pipelineStashFiles: generate docu
This commit is contained in:
commit
926f2c12df
@ -1,22 +1,12 @@
|
||||
# pipelineStashFiles
|
||||
# ${docGenStepName}
|
||||
|
||||
## Description
|
||||
|
||||
This step stashes files that are needed in other build steps (on other nodes).
|
||||
## ${docGenDescription}
|
||||
|
||||
## Prerequsites
|
||||
|
||||
none
|
||||
|
||||
## Parameters
|
||||
|
||||
| parameter | mandatory | default | possible values |
|
||||
| ----------|-----------|---------|-----------------|
|
||||
| script | yes | | |
|
||||
| runCheckmarx | no | false | |
|
||||
| runOpaTests | no | false | |
|
||||
| stashIncludes | no | see details | |
|
||||
| stashExcludes | no | see details | |
|
||||
## ${docGenParameters}
|
||||
|
||||
Details:
|
||||
|
||||
@ -42,14 +32,7 @@ The step is stashing files before and after the build. This is due to the fact,
|
||||
* `stashIncludes: [buildDescriptor: '**/mybuild.yml]`
|
||||
* `stashExcludes: [tests: '**/NOTRELEVANT.*]`
|
||||
|
||||
## Step configuration
|
||||
|
||||
The following parameters can also be specified as step parameters using the global configuration file:
|
||||
|
||||
* runOpaTests
|
||||
* runCheckmarx
|
||||
* stashExcludes
|
||||
* stashIncludes
|
||||
## ${docGenConfiguration}
|
||||
|
||||
## Explanation of pipeline step
|
||||
|
||||
|
11
documentation/docs/steps/pipelineStashFilesAfterBuild.md
Normal file
11
documentation/docs/steps/pipelineStashFilesAfterBuild.md
Normal file
@ -0,0 +1,11 @@
|
||||
# ${docGenStepName}
|
||||
|
||||
## ${docGenDescription}
|
||||
|
||||
## Prerequsites
|
||||
|
||||
none
|
||||
|
||||
## ${docGenParameters}
|
||||
|
||||
## ${docGenConfiguration}
|
11
documentation/docs/steps/pipelineStashFilesBeforeBuild.md
Normal file
11
documentation/docs/steps/pipelineStashFilesBeforeBuild.md
Normal file
@ -0,0 +1,11 @@
|
||||
# ${docGenStepName}
|
||||
|
||||
## ${docGenDescription}
|
||||
|
||||
## Prerequsites
|
||||
|
||||
none
|
||||
|
||||
## ${docGenParameters}
|
||||
|
||||
## ${docGenConfiguration}
|
@ -1,7 +1,31 @@
|
||||
import com.sap.piper.GenerateDocumentation
|
||||
import groovy.transform.Field
|
||||
|
||||
@Field STEP_NAME = getClass().getName()
|
||||
|
||||
@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
|
||||
void call(Map parameters = [:], body) {
|
||||
handlePipelineStepErrors (stepName: 'pipelineStashFiles', stepParameters: parameters) {
|
||||
|
||||
|
@ -1,13 +1,34 @@
|
||||
import static com.sap.piper.Prerequisites.checkScript
|
||||
|
||||
import com.sap.piper.GenerateDocumentation
|
||||
import com.sap.piper.Utils
|
||||
import com.sap.piper.ConfigurationHelper
|
||||
import groovy.transform.Field
|
||||
|
||||
@Field String STEP_NAME = getClass().getName()
|
||||
@Field Set STEP_CONFIG_KEYS = ['noDefaultExludes', 'stashIncludes', 'stashExcludes']
|
||||
|
||||
@Field Set GENERAL_CONFIG_KEYS = []
|
||||
|
||||
@Field Set STEP_CONFIG_KEYS = [
|
||||
/**
|
||||
* By default certain files are excluded from stashing (e.g. `.git` folder).
|
||||
* Details can be found 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).
|
||||
* This parameter allows to provide a list of stash names for which the standard exclude behavior should be switched off.
|
||||
* This will allow you to also stash directories like `.git`.
|
||||
*/
|
||||
'noDefaultExludes',
|
||||
/** @see pipelineStashFiles */
|
||||
'stashIncludes',
|
||||
/** @see pipelineStashFiles */
|
||||
'stashExcludes'
|
||||
]
|
||||
|
||||
@Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS
|
||||
|
||||
/**
|
||||
* This step stashes files that are needed in other build steps (on other nodes).
|
||||
*/
|
||||
@GenerateDocumentation
|
||||
void call(Map parameters = [:]) {
|
||||
|
||||
handlePipelineStepErrors (stepName: STEP_NAME, stepParameters: parameters, stepNameDoc: 'stashFiles') {
|
||||
|
@ -1,13 +1,34 @@
|
||||
import static com.sap.piper.Prerequisites.checkScript
|
||||
|
||||
import com.sap.piper.GenerateDocumentation
|
||||
import com.sap.piper.Utils
|
||||
import com.sap.piper.ConfigurationHelper
|
||||
import groovy.transform.Field
|
||||
|
||||
@Field String STEP_NAME = getClass().getName()
|
||||
@Field Set STEP_CONFIG_KEYS = ['noDefaultExludes', 'stashIncludes', 'stashExcludes']
|
||||
|
||||
@Field Set GENERAL_CONFIG_KEYS = []
|
||||
|
||||
@Field Set STEP_CONFIG_KEYS = [
|
||||
/**
|
||||
* By default certain files are excluded from stashing (e.g. `.git` folder).
|
||||
* Details can be found 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).
|
||||
* This parameter allows to provide a list of stash names for which the standard exclude behavior should be switched off.
|
||||
* This will allow you to also stash directories like `.git`.
|
||||
*/
|
||||
'noDefaultExludes',
|
||||
/** @see pipelineStashFiles */
|
||||
'stashIncludes',
|
||||
/** @see pipelineStashFiles */
|
||||
'stashExcludes'
|
||||
]
|
||||
|
||||
@Field Set PARAMETER_KEYS = STEP_CONFIG_KEYS
|
||||
|
||||
/**
|
||||
* This step stashes files that are needed in other build steps (on other nodes).
|
||||
*/
|
||||
@GenerateDocumentation
|
||||
void call(Map parameters = [:]) {
|
||||
|
||||
handlePipelineStepErrors (stepName: STEP_NAME, stepParameters: parameters, stepNameDoc: 'stashFiles') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user