github.com/jaylevin/jenkins-library@v1.230.4/documentation/docs/steps/checkChangeInDevelopment.md (about) 1 # ${docGenStepName} 2 3 ## ${docGenDescription} 4 5 ## Migration Guide 6 7 **Note:** This step has been deprecated. Use the new step [isChangeInDevelopment](isChangeInDevelopment.md) instead. 8 9 Adjust your parameters to the naming convention of the new step. 10 Adjust the unsupported parameters as indicated in the table below: 11 12 | Unsupported Parameter | New Parameter | 13 | ------------- | ------------- | 14 | changeManagement/type | This parameter has been removed. `SOLMAN` is the only backend type supported. | 15 | changeManagement/`<type>`/docker/envVars | `dockerEnvVars` | 16 | changeManagement/`<type>`/docker/image | `dockerImage` | 17 | changeManagement/`<type>`/docker/options | `dockerOptions` | 18 | changeManagement/`<type>`/docker/pullImage | `dockerPullImage` | 19 | 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. | 20 21 Your config.yml file should look as follows: 22 23 ```yaml 24 general: 25 26 # new naming convention 27 steps: 28 isChangeInDevelopment: 29 dockerImage: 'ppiper/cm-client:3.0.0.0' 30 ``` 31 32 **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. 33 34 ## ${docGenParameters} 35 36 ## ${docGenConfiguration} 37 38 ## ${docJenkinsPluginDependencies} 39 40 ## Exceptions 41 42 * `AbortException`: 43 * If the change id is not provided via parameter and if the change document id cannot be retrieved from the commit history. 44 * If the change is not in status `in development`. In this case no exception will be thrown when `failIfStatusIsNotInDevelopment` is set to `false`. 45 * `IllegalArgumentException`: 46 * If a mandatory property is not provided. 47 48 ## Examples 49 50 The step is configured using a customer configuration file provided as 51 resource in an custom shared library. 52 53 ```groovy 54 @Library('piper-lib-os@master') _ 55 56 // the shared lib containing the additional configuration 57 // needs to be configured in Jenkins 58 @Library('foo@master') __ 59 60 // inside the shared lib denoted by 'foo' the additional configuration file 61 // needs to be located under 'resources' ('resoures/myConfig.yml') 62 prepareDefaultValues script: this, customDefaults: 'myConfig.yml' 63 ``` 64 65 Example content of `'resources/myConfig.yml'` in branch `'master'` of the repository denoted by 66 `'foo'`: 67 68 ```yaml 69 general: 70 changeManagement: 71 changeDocumentLabel: 'ChangeDocument\s?:' 72 cmClientOpts: '-Djavax.net.ssl.trustStore=<path to truststore>' 73 credentialsId: 'CM' 74 endpoint: 'https://example.org/cm' 75 git: 76 from: 'HEAD~1' 77 to: 'HEAD' 78 format: '%b' 79 ``` 80 81 The properties configured in section `'general/changeManagement'` are shared between all change management related steps. 82 83 The properties can also be configured on a per-step basis: 84 85 ```yaml 86 [...] 87 steps: 88 checkChangeInDevelopment: 89 changeManagement: 90 endpoint: 'https://example.org/cm' 91 [...] 92 failIfStatusIsNotInDevelopment: true 93 ``` 94 95 The parameters can also be provided when the step is invoked: 96 97 ```groovy 98 // simple case. All mandatory parameters provided via 99 // configuration, changeDocumentId provided via commit 100 // history 101 checkChangeInDevelopment script:this 102 ``` 103 104 ```groovy 105 // explicit endpoint provided, we search for changeDocumentId 106 // starting at the previous commit (HEAD~1) rather than on 107 // 'origin/master' (the default). 108 checkChangeInDevelopment( 109 script: this 110 changeManagement: [ 111 endpoint: 'https:example.org/cm' 112 git: [ 113 from: 'HEAD~1' 114 ] 115 ] 116 ) 117 ```