2018-06-20 11:46:28 +02:00
# transportRequestUploadFile
## Description
Uploads a file to a Transport Request for a Change Document on the Solution Manager.
## Prerequisites
* **[Change Management Client 2.0.0 or compatible version](http://central.maven.org/maven2/com/sap/devops/cmclient/dist.cli/)** - available for download on Maven Central.
## Parameters
| parameter | mandatory | default | possible values |
| -----------------|-----------|--------------------------------------------------------|--------------------|
| `script` | yes | | |
2018-06-28 08:46:23 +02:00
| `changeDocumentId` | yes | | |
2018-06-20 11:46:28 +02:00
| `transportRequestId` | yes | | |
| `applicationId` | yes | | |
| `filePath` | yes | | |
2018-06-28 16:24:14 +02:00
| `credentialsId` | yes | | |
| `endpoint` | yes | | |
2018-07-10 15:15:54 +02:00
| `gitFrom` | no | `origin/master` | |
| `gitTo` | no | `HEAD` | |
| `gitChangeDocumentLabel` | no | `ChangeDocument\s?:` | regex pattern |
| `gitFormat` | no | `%b` | see `git log --help` |
2018-06-20 11:46:28 +02:00
* `script` - The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the `this` parameter, as in `script: this` . This allows the function to access the [`commonPipelineEnvironment` ](commonPipelineEnvironment.md ) for retrieving, for example, configuration parameters.
2018-06-28 08:46:23 +02:00
* `changeDocumentId` - The id of the change document related to the transport request to release.
2018-06-20 11:46:28 +02:00
* `transportRequestId` - The id of the transport request to release.
* `applicationId` - The id of the application.
* `filePath` - The path of the file to upload.
2018-06-28 16:24:14 +02:00
* `credentialsId` - The credentials to connect to the Solution Manager.
* `endpoint` - The address of the Solution Manager.
2018-07-10 15:15:54 +02:00
* `gitFrom` - The starting point for retrieving the change document id
* `gitTo` - The end point for retrieving the change document id
* `gitChangeDocumentLabel` - A pattern used for identifying lines holding the change document id.
* `gitFormat` - Specifies what part of the commit is scanned. By default the body of the commit message is scanned.
2018-06-20 11:46:28 +02:00
## Step configuration
The following parameters can also be specified as step parameters using the global configuration file:
2018-06-28 16:24:14 +02:00
* `credentialsId`
* `endpoint`
2018-06-20 11:46:28 +02:00
## Return value
None.
## Exceptions
* `AbortException` :
* If the change id is not provided.
* If the transport request id is not provided.
* If the application id is not provided.
* If the file path is not provided.
* If the upload fails.
## Example
```groovy
2018-06-28 08:46:23 +02:00
transportRequestUploadFile script:this, changeDocumentId: '001', transportRequestId: '001', applicationId: '001', filePath: '/path'
2018-06-20 11:46:28 +02:00
```