Integrate SAP Cloud Platform Transport Management Into Your CI/CD Pipeline¶
Extend your CI/CD pipeline with SAP Cloud Platform Transport Management to add an enterprise-ready change and release management process and enable the transport of cloud-based applications on SAP Cloud Platform between several stages.
This procedure explains how to upload a multitartget application from a CI/CD pipeline to SAP Cloud Platform Transport Management and then import it into its target environment.
SAP Cloud Platform Transport Management allows you to manage the transport of development artifacts and application-specific content between different SAP Cloud Platform accounts. It adds transparency to the audit trail of changes so that you get information about who performed which changes in your production accounts and when they did it. At the same time, the Transport Management service enables a separation of concerns: For example, a developer of an application or SAP Cloud Platform content artifacts can trigger the propagation of changes, while the resulting transport is handled by a central operations team. For more information, see SAP Cloud Platform Transport Management.
The following graphic provides an overview about the interplay between continuous integration and Transport Management:
- You have an existing CI pipeline, which you want to extend with SAP Cloud Platform Transport Management.
- You have an MTA project and the folder structure of its sources corresponds to the standard MTA structure. For more information, see The Multitarget Application Model.
- You have access to SAP Cloud Platform Transport Management. See Provide Access to SAP Cloud Platform Transport Management.
- You have set up SAP Cloud Platform Transport Management and created a service key. See Set Up the Environment to Transport Content Archives directly in an Application.
- You have configured your Transport Management landscape. See Configuring the Landscape.
You can use this scenario to extend any CI process that meets the prerequisites, for example, the one described in Build and Deploy SAPUI5 or SAP Fiori Applications on SAP Cloud Platform with Jenkins.
The following graphic shows an example of the detailed procedure when combining continuous integration and SAP Cloud Platform Transport Management:
The process flow contains the following steps:
- The CI server builds a multitarget application (MTA) archive.
- The MTA is uploaded into the import queue of the target node, which is specified in the CI pipeline (in this example, PRE-PROD).
- The release manager manually triggers or schedules the import, which results in the physical deployment of the MTA archive into the corresponding subaccount (in this example, PRE-PROD).
- As soon as the import is executed, a transport is triggered along the defined transport route so that the MTA archive reaches the import queue of the next node (in this example, PROD).
- There, the physical import into the corresponding subaccount can be either triggered manually by the release manager or automatically by using the scheduling mechanisms of SAP Cloud Platform Transport Management.
If you use the pipeline of the following code snippet, you only have to configure it in the .pipeline/config.yml.
Following the convention for pipeline definitions, use a Jenkinsfile, which resides in the root directory of your development sources.
@Library('piper-lib-os') _ piperPipeline script:this
This is a basic configuration example, which is also located in the sources of the project.
steps: tmsUpload: credentialsId: tms-secret-key nodeName: tms_target_node mtaPath: com.piper.example.tms.mtar customDescription: Custom-Transport-Description
Configration for the Upload to Transport Management¶
||Credentials that are used for the file and node uploads to the Transport Management Service.|
||Defines the name of the node to which the *.mtar file is uploaded.|
||Defines the path to *.mtar for the upload to the Transport Management Service.|
||Can be used as description of a transport request. Overwrites the default (Default: Corresponding Git Commit-ID).|
For a detailed description of the relevant parameters, see tmsUpload.