github.com/jaylevin/jenkins-library@v1.230.4/documentation/docs/steps/transportRequestUploadSOLMAN.md (about) 1 # ${docGenStepName} 2 3 ## ${docGenDescription} 4 5 ## Prerequisites 6 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). 8 * You have a change document to which your transport request is coupled. 9 * You have a transport request, which is the target container of the upload. 10 * You have installed the Change Management Client with the needed certificates. See [Change Management Client](#Change-Management-Client). 11 12 ## Change Management Client 13 14 The Change Management Client (CM Client) handles the access to SAP Solution Manager. 15 The CM Client is a software running under Linux, which can initiate basic change management tasks 16 in the Solution Manager. The client is used by default 17 as a [Docker image](https://hub.docker.com/r/ppiper/cm-client), 18 but can also be installed as a [command line tool](https://github.com/SAP/devops-cm-client). 19 20 !!! note "Certificates" 21 It is expected that the Solution Manager endpoint is secured by SSL and sends a certificate accordingly. 22 The CM Client verifies the certificate. If the publisher of this certificate is unknown, the connection will be rejected. 23 The CM Client uses the underlying JDK procedures for the verification. 24 Accordingly, the issuer must be specified in the truststore of the JDK. 25 26 Create a clone of the image and add the necessary certificate to its truststore in case you use the [Docker image](https://hub.docker.com/r/ppiper/cm-client). 27 Extend the truststore of the environment with the necessary certificate in the case you use the immediate [command line tool](https://github.com/SAP/devops-cm-client). 28 29 ## Specifying the Change Document and Transport Request 30 31 The target of the upload is a transport request and the associated change document. 32 Both objects are identified by identifiers (ID). 33 `transportRequestUploadSOLMAN` allows you to set IDs by parameter. 34 Alternatively, you can pass the IDs through the Common Pipeline Environment. 35 For example, by performing a step that generates the IDs or obtains them differently. 36 See [transportRequestDocIDFromGit](transportRequestDocIDFromGit.md) and [transportRequestReqIDFromGit](transportRequestReqIDFromGit.md) 37 38 ### By Step Parameter 39 40 A parameterized pipeline allows to specify the IDs with the launch of the build 41 instead of entering them statically into the pipeline. 42 43 ```groovy 44 transportRequestUploadSOLMAN( 45 script: this, 46 changeDocumentId: ${CHANGE_DOCUMENT_ID}, 47 transportRequestId: ${TRANSPORT_REQUEST_ID}, 48 ... 49 ) 50 ``` 51 52 The Jenkins pipeline `input` step allows to specify the IDs at runtime of the pipeline. 53 54 ```groovy 55 def ids = input( message: "Upload?", 56 parameters: [ 57 string(name: 'CHANGE_DOCUMENT_ID',description: 'Change Document ID'), 58 string(name: 'TRANSPORT_REQUEST_ID',description: 'Transport Request ID') 59 ] 60 ) 61 62 transportRequestUploadSOLMAN( 63 script:this, 64 changeDocumentId: ids['CHANGE_DOCUMENT_ID'], 65 transportRequestId: ids['TRANSPORT_REQUEST_ID'], 66 ... 67 ) 68 ``` 69 70 ## Common Pipeline Environment 71 72 With OS Piper you can use the steps [transportRequestDocIDFromGit](transportRequestDocIDFromGit.md) and [transportRequestReqIDFromGit](transportRequestReqIDFromGit.md) to obtain the `changeDocumentId` and `transportRequestId` values from your Git commit messages. 73 The steps enter the IDs into the `commonPipelineEnvironment`, in turn, the upload step `transportRequestUploadSOLMAN` picks them up from there. 74 75 ```groovy 76 transportRequestDocIDFromGit( script: this ) 77 transportRequestReqIDFromGit( script: this ) 78 transportRequestUploadSOLMAN( script: this, ... ) 79 ``` 80 81 ## ${docGenParameters} 82 83 ## ${docGenConfiguration} 84 85 ## ${docJenkinsPluginDependencies} 86 87 ## Example 88 89 ```groovy 90 transportRequestUploadSOLMAN( 91 script: this, 92 endpoint: 'https://example.org/cm/solman/endpoint' 93 applicationId: 'ABC', 94 uploadCredentialsId: "SOLMAN_CRED_ID" 95 changeDocumentId: '1000001234', 96 transportRequestId: 'ABCD10005E', 97 filePath: '/path/file.ext', 98 cmClientOpts: '-Dkey=value' 99 ) 100 ```