mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-05 15:15:44 +02:00
Merge pull request #635 from alejandraferreirovidal/setupCommonPipelineEnvironment
setupCommonPipelineEnvironment: generate docu
This commit is contained in:
commit
083b38cac4
@ -1,30 +1,14 @@
|
||||
# setupCommonPipelineEnvironment
|
||||
# ${docGenStepName}
|
||||
|
||||
## Description
|
||||
|
||||
Initializes the [`commonPipelineEnvironment`](commonPipelineEnvironment.md), which is used throughout the complete pipeline.
|
||||
|
||||
!!! tip
|
||||
This step needs to run at the beginning of a pipeline right after the SCM checkout.
|
||||
Then subsequent pipeline steps consume the information from `commonPipelineEnvironment`; it does not need to be passed to pipeline steps explicitly.
|
||||
## ${docGenDescription}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* A **configuration file** with properties (default location: `.pipeline/config.properties`). The property values are used as default values in many pipeline steps.
|
||||
* A **configuration file** with properties. The property values are used as default values in many pipeline steps.
|
||||
|
||||
## Parameters
|
||||
## ${docGenParameters}
|
||||
|
||||
| parameter | mandatory | default | possible values |
|
||||
| ------------ |-----------|-------------------------------|-----------------|
|
||||
| `script` | yes | - | |
|
||||
| `configFile` | no | `.pipeline/config.properties` | |
|
||||
|
||||
* `script` - The reference to the pipeline script (Jenkinsfile). Normally `this` needs to be provided.
|
||||
* `configFile` - Property file defining project specific settings.
|
||||
|
||||
## Step configuration
|
||||
|
||||
none
|
||||
## ${docGenConfiguration}
|
||||
|
||||
## Side effects
|
||||
|
||||
|
@ -1,12 +1,32 @@
|
||||
import static com.sap.piper.Prerequisites.checkScript
|
||||
|
||||
import com.sap.piper.GenerateDocumentation
|
||||
import com.sap.piper.ConfigurationHelper
|
||||
import com.sap.piper.Utils
|
||||
import groovy.transform.Field
|
||||
|
||||
@Field String STEP_NAME = getClass().getName()
|
||||
@Field Set GENERAL_CONFIG_KEYS = ['collectTelemetryData']
|
||||
|
||||
@Field Set GENERAL_CONFIG_KEYS = [
|
||||
/** */
|
||||
'collectTelemetryData'
|
||||
]
|
||||
|
||||
@Field Set STEP_CONFIG_KEYS = []
|
||||
|
||||
@Field Set PARAMETER_KEYS = [
|
||||
/** Property file defining project specific settings.*/
|
||||
'configFile'
|
||||
]
|
||||
|
||||
/**
|
||||
* Initializes the [`commonPipelineEnvironment`](commonPipelineEnvironment.md), which is used throughout the complete pipeline.
|
||||
*
|
||||
* !!! tip
|
||||
* This step needs to run at the beginning of a pipeline right after the SCM checkout.
|
||||
* Then subsequent pipeline steps consume the information from `commonPipelineEnvironment`; it does not need to be passed to pipeline steps explicitly.
|
||||
*/
|
||||
@GenerateDocumentation
|
||||
void call(Map parameters = [:]) {
|
||||
|
||||
handlePipelineStepErrors (stepName: STEP_NAME, stepParameters: parameters) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user