diff --git a/documentation/docs/steps/transportRequestCreate.md b/documentation/docs/steps/transportRequestCreate.md index 55ce9a2c7..4968b4104 100644 --- a/documentation/docs/steps/transportRequestCreate.md +++ b/documentation/docs/steps/transportRequestCreate.md @@ -11,19 +11,19 @@ Creates a Transport Request for a Change Document on the Solution Manager. | -----------------|-----------|--------------------------------------------------------|--------------------| | `script` | yes | | | | `changeDocumentId` | yes | | | -| `cmCredentialsId` | yes | | | -| `cmEndpoint` | yes | | | +| `credentialsId` | yes | | | +| `endpoint` | yes | | | * `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. * `changeDocumentId` - The id of the change document to transport. -* `cmCredentialsId` - The credentials to connect to the Solution Manager. -* `cmEndpoint` - The address of the Solution Manager. +* `credentialsId` - The credentials to connect to the Solution Manager. +* `endpoint` - The address of the Solution Manager. ## Step configuration The following parameters can also be specified as step parameters using the global configuration file: -* `cmCredentialsId` -* `cmEndpoint` +* `credentialsId` +* `endpoint` ## Return value The id of the Transport Request that has been created. diff --git a/documentation/docs/steps/transportRequestRelease.md b/documentation/docs/steps/transportRequestRelease.md index 9940309bb..5e1efb12b 100644 --- a/documentation/docs/steps/transportRequestRelease.md +++ b/documentation/docs/steps/transportRequestRelease.md @@ -12,20 +12,20 @@ Releases a Transport Request for a Change Document on the Solution Manager. | `script` | yes | | | | `changeDocumentId` | yes | | | | `transportRequestId`| yes | | | -| `cmCredentialsId` | yes | | | -| `cmEndpoint` | yes | | | +| `credentialsId` | yes | | | +| `endpoint` | yes | | | * `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. * `changeDocumentId` - The id of the change document related to the transport request to release. * `transportRequestId` - The id of the transport request to release. -* `cmCredentialsId` - The credentials to connect to the Solution Manager. -* `cmEndpoint` - The address of the Solution Manager. +* `credentialsId` - The credentials to connect to the Solution Manager. +* `endpoint` - The address of the Solution Manager. ## Step configuration The following parameters can also be specified as step parameters using the global configuration file: -* `cmCredentialsId` -* `cmEndpoint` +* `credentialsId` +* `endpoint` ## Return value None. diff --git a/documentation/docs/steps/transportRequestUploadFile.md b/documentation/docs/steps/transportRequestUploadFile.md index 2fd325f49..2f49986b1 100644 --- a/documentation/docs/steps/transportRequestUploadFile.md +++ b/documentation/docs/steps/transportRequestUploadFile.md @@ -14,22 +14,22 @@ Uploads a file to a Transport Request for a Change Document on the Solution Mana | `transportRequestId`| yes | | | | `applicationId` | yes | | | | `filePath` | yes | | | -| `cmCredentialsId` | yes | | | -| `cmEndpoint` | yes | | | +| `credentialsId` | yes | | | +| `endpoint` | yes | | | * `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. * `changeDocumentId` - The id of the change document related to the transport request to release. * `transportRequestId` - The id of the transport request to release. * `applicationId` - The id of the application. * `filePath` - The path of the file to upload. -* `cmCredentialsId` - The credentials to connect to the Solution Manager. -* `cmEndpoint` - The address of the Solution Manager. +* `credentialsId` - The credentials to connect to the Solution Manager. +* `endpoint` - The address of the Solution Manager. ## Step configuration The following parameters can also be specified as step parameters using the global configuration file: -* `cmCredentialsId` -* `cmEndpoint` +* `credentialsId` +* `endpoint` ## Return value None. diff --git a/test/groovy/TransportRequestCreateTest.groovy b/test/groovy/TransportRequestCreateTest.groovy index a82682835..910fb5c23 100644 --- a/test/groovy/TransportRequestCreateTest.groovy +++ b/test/groovy/TransportRequestCreateTest.groovy @@ -47,8 +47,8 @@ public class TransportRequestCreateTest extends BasePiperTest { nullScript.commonPipelineEnvironment.configuration = [steps: [transportRequestCreate: [ - cmCredentialsId: 'CM', - cmEndpoint: 'https://example.org/cm' + credentialsId: 'CM', + endpoint: 'https://example.org/cm' ] ] ] diff --git a/test/groovy/TransportRequestReleaseTest.groovy b/test/groovy/TransportRequestReleaseTest.groovy index 1475aa481..dcb023421 100644 --- a/test/groovy/TransportRequestReleaseTest.groovy +++ b/test/groovy/TransportRequestReleaseTest.groovy @@ -47,8 +47,8 @@ public class TransportRequestReleaseTest extends BasePiperTest { nullScript.commonPipelineEnvironment.configuration = [steps: [transportRequestRelease: [ - cmCredentialsId: 'CM', - cmEndpoint: 'https://example.org/cm' + credentialsId: 'CM', + endpoint: 'https://example.org/cm' ] ] ] diff --git a/test/groovy/TransportRequestUploadFileTest.groovy b/test/groovy/TransportRequestUploadFileTest.groovy index f18609a26..8de187d67 100644 --- a/test/groovy/TransportRequestUploadFileTest.groovy +++ b/test/groovy/TransportRequestUploadFileTest.groovy @@ -47,8 +47,8 @@ public class TransportRequestUploadFileTest extends BasePiperTest { nullScript.commonPipelineEnvironment.configuration = [steps: [transportRequestUploadFile: [ - cmCredentialsId: 'CM', - cmEndpoint: 'https://example.org/cm' + credentialsId: 'CM', + endpoint: 'https://example.org/cm' ] ] ] diff --git a/vars/transportRequestCreate.groovy b/vars/transportRequestCreate.groovy index ca698efde..049feece8 100644 --- a/vars/transportRequestCreate.groovy +++ b/vars/transportRequestCreate.groovy @@ -13,13 +13,13 @@ import hudson.AbortException @Field Set parameterKeys = [ 'changeDocumentId', 'developmentSystemId', - 'cmCredentialsId', - 'cmEndpoint' + 'credentialsId', + 'endpoint' ] @Field Set stepConfigurationKeys = [ - 'cmCredentialsId', - 'cmEndpoint' + 'credentialsId', + 'endpoint' ] def call(parameters = [:]) { @@ -40,23 +40,23 @@ def call(parameters = [:]) { def developmentSystemId = configuration.developmentSystemId if(!developmentSystemId) throw new AbortException('Development system id not provided (parameter: \'developmentSystemId\').') - def cmCredentialsId = configuration.cmCredentialsId - if(!cmCredentialsId) throw new AbortException('Credentials id not provided (parameter: \'cmCredentialsId\').') + def credentialsId = configuration.credentialsId + if(!credentialsId) throw new AbortException('Credentials id not provided (parameter: \'credentialsId\').') - def cmEndpoint = configuration.cmEndpoint - if(!cmEndpoint) throw new AbortException('Solution Manager endpoint not provided (parameter: \'cmEndpoint\').') + def endpoint = configuration.endpoint + if(!endpoint) throw new AbortException('Solution Manager endpoint not provided (parameter: \'endpoint\').') def transportRequestId echo "[INFO] Creating transport request for change document '$changeDocumentId' and development system '$developmentSystemId'." withCredentials([usernamePassword( - credentialsId: cmCredentialsId, + credentialsId: credentialsId, passwordVariable: 'password', usernameVariable: 'username')]) { try { - transportRequestId = cm.createTransportRequest(changeDocumentId, developmentSystemId, cmEndpoint, username, password) + transportRequestId = cm.createTransportRequest(changeDocumentId, developmentSystemId, endpoint, username, password) } catch(ChangeManagementException ex) { throw new AbortException(ex.getMessage()) } diff --git a/vars/transportRequestRelease.groovy b/vars/transportRequestRelease.groovy index 3b4000d16..bfa5c44b4 100644 --- a/vars/transportRequestRelease.groovy +++ b/vars/transportRequestRelease.groovy @@ -13,13 +13,13 @@ import hudson.AbortException @Field Set parameterKeys = [ 'changeDocumentId', 'transportRequestId', - 'cmCredentialsId', - 'cmEndpoint' + 'credentialsId', + 'endpoint' ] @Field Set stepConfigurationKeys = [ - 'cmCredentialsId', - 'cmEndpoint' + 'credentialsId', + 'endpoint' ] def call(parameters = [:]) { @@ -40,21 +40,21 @@ def call(parameters = [:]) { def transportRequestId = configuration.transportRequestId if(!transportRequestId) throw new AbortException("Transport Request id not provided (parameter: 'transportRequestId').") - def cmCredentialsId = configuration.cmCredentialsId - if(!cmCredentialsId) throw new AbortException("Credentials id not provided (parameter: 'cmCredentialsId').") + def credentialsId = configuration.credentialsId + if(!credentialsId) throw new AbortException("Credentials id not provided (parameter: 'credentialsId').") - def cmEndpoint = configuration.cmEndpoint - if(!cmEndpoint) throw new AbortException("Solution Manager endpoint not provided (parameter: 'cmEndpoint').") + def endpoint = configuration.endpoint + if(!endpoint) throw new AbortException("Solution Manager endpoint not provided (parameter: 'endpoint').") echo "[INFO] Closing transport request '$transportRequestId' for change document '$changeDocumentId'." withCredentials([usernamePassword( - credentialsId: cmCredentialsId, + credentialsId: credentialsId, passwordVariable: 'password', usernameVariable: 'username')]) { try { - cm.releaseTransportRequest(changeDocumentId, transportRequestId, cmEndpoint, username, password) + cm.releaseTransportRequest(changeDocumentId, transportRequestId, endpoint, username, password) } catch(ChangeManagementException ex) { throw new AbortException(ex.getMessage()) } diff --git a/vars/transportRequestUploadFile.groovy b/vars/transportRequestUploadFile.groovy index e44e74ad5..1c7b85135 100644 --- a/vars/transportRequestUploadFile.groovy +++ b/vars/transportRequestUploadFile.groovy @@ -15,13 +15,13 @@ import hudson.AbortException 'transportRequestId', 'applicationId', 'filePath', - 'cmCredentialsId', - 'cmEndpoint' + 'credentialsId', + 'endpoint' ] @Field Set generalConfigurationKeys = [ - 'cmCredentialsId', - 'cmEndpoint' + 'credentialsId', + 'endpoint' ] def call(parameters = [:]) { @@ -48,21 +48,21 @@ def call(parameters = [:]) { def filePath = configuration.filePath if(!filePath) throw new AbortException("File path not provided (parameter: 'filePath').") - def cmCredentialsId = configuration.cmCredentialsId - if(!cmCredentialsId) throw new AbortException("Credentials id not provided (parameter: 'cmCredentialsId').") + def credentialsId = configuration.credentialsId + if(!credentialsId) throw new AbortException("Credentials id not provided (parameter: 'credentialsId').") - def cmEndpoint = configuration.cmEndpoint - if(!cmEndpoint) throw new AbortException("Solution Manager endpoint not provided (parameter: 'cmEndpoint').") + def endpoint = configuration.endpoint + if(!endpoint) throw new AbortException("Solution Manager endpoint not provided (parameter: 'endpoint').") echo "[INFO] Uploading file '$filePath' to transport request '$transportRequestId' of change document '$changeDocumentId'." withCredentials([usernamePassword( - credentialsId: cmCredentialsId, + credentialsId: credentialsId, passwordVariable: 'password', usernameVariable: 'username')]) { try { - cm.uploadFileToTransportRequest(changeDocumentId, transportRequestId, applicationId, filePath, cmEndpoint, username, password) + cm.uploadFileToTransportRequest(changeDocumentId, transportRequestId, applicationId, filePath, endpoint, username, password) } catch(ChangeManagementException ex) { throw new AbortException(ex.getMessage()) }