github.com/xgoffin/jenkins-library@v1.154.0/documentation/docs/steps/isChangeInDevelopment.md (about)

     1  # ${docGenStepName}
     2  
     3  ## ${docGenDescription}
     4  
     5  ## Prerequisites
     6  
     7  * 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).
     8  * You have created a change document.
     9  * You have installed the Change Management Client with the needed certificates. See [Change Management Client](transportRequestUploadSOLMAN.md#Change-Management-Client).
    10  
    11  ## Specifying the Change Document
    12  
    13  The target of the status check is a change document identified by an identifier (ID).
    14  
    15  Specify the ID by [step parameter](transportRequestUploadSOLMAN#By-Step-Parameter) or [common pipeline environment](transportRequestUploadSOLMAN#Common-Pipeline-Environment).
    16  
    17  ## Return Value
    18  
    19  The step `isChangeInDevelopment` returns a boolean value by setting the custom key
    20  `custom.isChangeInDevelopment` of the common pipeline environment:
    21  
    22  - `true` if the change document is in status `in development`.
    23  
    24  - `false` if the change document is _**not**_ in status `in development`. In this case, `AbortException` terminates the execution of the pipeline job.
    25  
    26  ```groovy
    27  // pipeline script
    28    isChangeInDevelopment( script: this )
    29    ...
    30  ```
    31  
    32  You can omit this exception by setting the configuration parameter `failIfStatusIsNotInDevelopment` to `false`:
    33  
    34  ```groovy
    35  // pipeline script
    36    isChangeInDevelopment( script: this, failIfStatusIsNotInDevelopment: false )
    37  
    38    if(commonPipelineEnvironment.getValue( 'isChangeInDevelopment' ) {
    39      ...
    40    }
    41  ```
    42  
    43  ## ${docGenParameters}
    44  
    45  ## ${docGenConfiguration}
    46  
    47  ## ${docJenkinsPluginDependencies}
    48  
    49  ## Examples
    50  
    51  ```yaml
    52  # config.yaml
    53  general:
    54    changeManagement:
    55      credentialsId: 'SOLMAN_CRED_ID'
    56      endpoint: 'https://example.org/cm/solman/endpoint'
    57  
    58  steps:
    59    isChangeInDevelopment:
    60      dockerImage: 'ppiper/cm-client'
    61  
    62    transportRequestUploadSOLMAN:
    63      dockerImage: 'ppiper/cm-client'
    64      applicationId: 'APPID',
    65      filePath: '/path/file.ext',
    66  ```
    67  
    68  ```groovy
    69  // pipeline script
    70     ...
    71     stage('Upload') {
    72        transportRequestDocIDFromGit( script: this )
    73  
    74        isChangeInDevelopment( script: this )
    75  
    76        transportRequestReqIDFromGit( script: this )
    77        transportRequestUploadSOLMAN( script: this )
    78     }
    79  ```