You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-07-01 00:54:55 +02:00
isChangeInDevelopment documentation (#3140)
* checkChangeInDevelopment to GO - add groovy step isChangeInDevelopment - direct to new Groovy - direct to GO
This commit is contained in:
@ -2,9 +2,34 @@
|
||||
|
||||
## ${docGenDescription}
|
||||
|
||||
## Prerequisites
|
||||
## Migration Guide
|
||||
|
||||
* No prerequisites
|
||||
**Note:** This step has been deprecated. Use the new step [isChangeInDevelopment](isChangeInDevelopment.md) instead.
|
||||
|
||||
Adjust your parameters to the naming convention of the new step.
|
||||
Adjust the unsupported parameters as indicated in the table below:
|
||||
|
||||
| Unsupported Parameter | New Parameter |
|
||||
| ------------- | ------------- |
|
||||
| changeManagement/type | This parameter has been removed. `SOLMAN` is the only backend type supported. |
|
||||
| changeManagement/`<type>`/docker/envVars | `dockerEnvVars` |
|
||||
| changeManagement/`<type>`/docker/image | `dockerImage` |
|
||||
| changeManagement/`<type>`/docker/options | `dockerOptions` |
|
||||
| changeManagement/`<type>`/docker/pullImage | `dockerPullImage` |
|
||||
| changeManagement/git/format | This parameter has been removed. Make sure that the IDS of your change document and transport request are part of the Git commit message body. |
|
||||
|
||||
Your config.yml file should look as follows:
|
||||
|
||||
```yaml
|
||||
general:
|
||||
|
||||
# new naming convention
|
||||
steps:
|
||||
isChangeInDevelopment:
|
||||
dockerImage: 'ppiper/cm-client'
|
||||
```
|
||||
|
||||
**Note:** The new step does not comprise the retrieval of the change document ID from the Git repository anymore. Use the step [transportRequestDocIDFromGit](transportRequestDocIDFromGit.md) instead.
|
||||
|
||||
## ${docGenParameters}
|
||||
|
||||
|
79
documentation/docs/steps/isChangeInDevelopment.md
Normal file
79
documentation/docs/steps/isChangeInDevelopment.md
Normal file
@ -0,0 +1,79 @@
|
||||
# ${docGenStepName}
|
||||
|
||||
## ${docGenDescription}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* You have an SAP Solution Manager user to which you have assigned the roles required for uploading. See [SAP Solution Manager Administration](https://help.sap.com/viewer/c413647f87a54db59d18cb074ce3dafd/7.2.12/en-US/11505ddff03c4d74976dae648743e10e.html).
|
||||
* You have created a change document.
|
||||
* You have installed the Change Management Client with the needed certificates. See [Change Management Client](transportRequestUploadSOLMAN.md#Change-Management-Client).
|
||||
|
||||
## Specifying the Change Document
|
||||
|
||||
The target of the status check is a change document identified by an identifier (ID).
|
||||
|
||||
Specify the ID by [step parameter](transportRequestUploadSOLMAN#By-Step-Parameter) or [common pipeline environment](transportRequestUploadSOLMAN#Common-Pipeline-Environment).
|
||||
|
||||
## Return Value
|
||||
|
||||
The step `isChangeInDevelopment` returns a boolean value by setting the custom key
|
||||
`custom.isChangeInDevelopment` of the common pipeline environment:
|
||||
|
||||
- `true` if the change document is in status `in development`.
|
||||
|
||||
- `false` if the change document is _**not**_ in status `in development`. In this case, `AbortException` terminates the execution of the pipeline job.
|
||||
|
||||
```groovy
|
||||
// pipeline script
|
||||
isChangeInDevelopment( script: this )
|
||||
...
|
||||
```
|
||||
|
||||
You can omit this exception by setting the configuration parameter `failIfStatusIsNotInDevelopment` to `false`:
|
||||
|
||||
```groovy
|
||||
// pipeline script
|
||||
isChangeInDevelopment( script: this, failIfStatusIsNotInDevelopment: false )
|
||||
|
||||
if(commonPipelineEnvironment.getValue( 'isChangeInDevelopment' ) {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
## ${docGenParameters}
|
||||
|
||||
## ${docGenConfiguration}
|
||||
|
||||
## ${docJenkinsPluginDependencies}
|
||||
|
||||
## Examples
|
||||
|
||||
```yaml
|
||||
# config.yaml
|
||||
general:
|
||||
changeManagement:
|
||||
credentialsId: 'SOLMAN_CRED_ID'
|
||||
endpoint: 'https://example.org/cm/solman/endpoint'
|
||||
|
||||
steps:
|
||||
isChangeInDevelopment:
|
||||
dockerImage: 'ppiper/cm-client'
|
||||
|
||||
transportRequestUploadSOLMAN:
|
||||
dockerImage: 'ppiper/cm-client'
|
||||
applicationId: 'APPID',
|
||||
filePath: '/path/file.ext',
|
||||
```
|
||||
|
||||
```groovy
|
||||
// pipeline script
|
||||
...
|
||||
stage('Upload') {
|
||||
transportRequestDocIDFromGit( script: this )
|
||||
|
||||
isChangeInDevelopment( script: this )
|
||||
|
||||
transportRequestReqIDFromGit( script: this )
|
||||
transportRequestUploadSOLMAN( script: this )
|
||||
}
|
||||
```
|
@ -7,7 +7,7 @@
|
||||
* You have an SAP Solution Manager user account and the roles required for uploading. See [SAP Solution Manager Administration](https://help.sap.com/viewer/c413647f87a54db59d18cb074ce3dafd/7.2.12/en-US/11505ddff03c4d74976dae648743e10e.html).
|
||||
* You have a change document to which your transport request is coupled.
|
||||
* You have a transport request, which is the target container of the upload.
|
||||
* You have installed the Change Management Client with the needed certificates. See [Change Management Client](#Change Management Client).
|
||||
* You have installed the Change Management Client with the needed certificates. See [Change Management Client](#Change-Management-Client).
|
||||
|
||||
## Change Management Client
|
||||
|
||||
|
Reference in New Issue
Block a user