diff --git a/documentation/docs/steps/setupCommonPipelineEnvironment.md b/documentation/docs/steps/setupCommonPipelineEnvironment.md index c79ca8d80..8f847a879 100644 --- a/documentation/docs/steps/setupCommonPipelineEnvironment.md +++ b/documentation/docs/steps/setupCommonPipelineEnvironment.md @@ -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 diff --git a/vars/setupCommonPipelineEnvironment.groovy b/vars/setupCommonPipelineEnvironment.groovy index f3ea7ac86..bf9edfb91 100644 --- a/vars/setupCommonPipelineEnvironment.groovy +++ b/vars/setupCommonPipelineEnvironment.groovy @@ -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) {