github.com/jaylevin/jenkins-library@v1.230.4/documentation/docs/scenarios/changeManagement.md (about) 1 # Build and Deploy Hybrid Applications with SAP Solution Manager 2 3 Set up an agile development process with Jenkins CI, which automatically feeds changes into SAP Solution Manager. 4 5 ## Prerequisites 6 7 * You have installed the Java Runtime Environment 8. 8 * You have installed Jenkins 2.60.3 or higher. 9 * You have set up project “Piper”. See [README](https://github.com/SAP/jenkins-library/blob/master/README.md). 10 * You have installed SAP Solution Manager 7.2 SP6. See [README](https://github.com/SAP/devops-cm-client/blob/master/README.md). 11 * You have installed the multitarget application archive builder 1.0.6 or newer. See [SAP Development Tools](https://tools.hana.ondemand.com/#cloud). **Note:** This is only required if you don't use a Docker-based environment. 12 * You have installed Node.js including node and npm. See [Node.js](https://nodejs.org/en/download/). **Note:** This is only required if you don't use a Docker-based environment. 13 14 ## Context 15 16 In many SAP development scenarios, it is vital to synchronize both backend and frontend deliveries. These deliveries are typically an SAPUI5 application and an ABAP backend from which it is served. The SAPUI5 parts are often developed using agile practices and use Continuous Integration pipelines that automatically build, test, and deploy the application. 17 18 !!! note 19 20 This scenario description is an example. You can apply the process to other scenarios and component sets, as well. 21 22 In this scenario, we want to show how an agile development process with Jenkins CI can automatically feed changes into SAP Solution Manager. In SAP Solution Manager, all parts of the application stack come together and can be subject to classic change and transport management. 23 24 The basic workflow is as follows: 25 26 1. The pipeline scans the Git commit messages for a line like `ChangeDocument : <changeDocumentId>`, and validates that the change is in the correct status `in development`. For more information, see [checkChangeInDevelopment](../../steps/checkChangeInDevelopment/). An example for the commit message looks as follows: 27 28 ``` 29 Fix terminology in documentation 30 31 Terminology must be consistent with official channels. 32 ChangeDocument: <Your Change Document ID> 33 ``` 34 35 **Note:** The blank line between message header and message description is mandatory. 36 37 1. To communicate with SAP Solution Manager, the pipeline uses credentials that must be stored on Jenkins using the credential ID `CM`. For more information, see [checkChangeInDevelopment](../../steps/checkChangeInDevelopment/). 38 1. The required transport request is created on the fly. **Note:** The change document can contain various components (for example, UI and backend components). 39 1. The changes of your development team trigger the Jenkins pipeline. It builds and validates the changes and attaches them to the respective transport request. 40 1. As soon as the development process is completed, the change document in SAP Solution Manager can be set to status `to be tested` and all components can be transported to the test system. 41 42  43 44 **Hybrid Application Development Workflow** 45 46 ## Example 47 48 ### Jenkinsfile 49 50 ```groovy 51 @Library('piper-lib-os') _ 52 53 node() { 54 55 stage('prepare') { 56 checkout scm 57 setupCommonPipelineEnvironment script:this 58 transportRequestDocIDFromGit( script: this ) 59 checkChangeInDevelopment script: this 60 } 61 62 stage('buildMta') { 63 mtaBuild script: this 64 } 65 66 stage('uploadToTransportRequest') { 67 transportRequestCreate script: this 68 transportRequestUploadSOLMAN script:this 69 transportRequestRelease script: this 70 } 71 72 } 73 ``` 74 75 ### Configuration (`.pipeline/config.yml`) 76 77 ```yaml 78 #Steps Specific Configuration 79 general: 80 changeManagement: 81 endpoint: 'https://<backend-system>/sap/opu/odata/sap/AI_CRM_GW_CM_CI_SRV' 82 credentialsId: 'CM' 83 type: 'SOLMAN' 84 steps: 85 mtaBuild: 86 buildTarget: 'NEO' 87 transportRequestCreate: 88 developmentSystemId: '<value for developmentSystemId>' 89 transportRequestUploadSOLMAN: 90 applicationId: 'HCP' 91 ``` 92 93 ### Parameters 94 95 For the detailed description of the relevant parameters, see: 96 97 * [checkChangeInDevelopment](../../steps/checkChangeInDevelopment/) 98 * [mtaBuild](../../steps/mtaBuild/) 99 * [transportRequestCreate](../../steps/transportRequestCreate/) 100 * [transportRequestDocIDFromGit](../../steps/transportRequestDocIDFromGit/) 101 * [transportRequestUploadSOLMAN](../../steps/transportRequestUploadSOLMAN/) 102 * [transportRequestRelease](../../steps/transportRequestRelease/)