github.com/jaylevin/jenkins-library@v1.230.4/documentation/docs/scenarios/xsa-deploy/Readme.md (about) 1 # Build and Deploy SAP Fiori Applications on SAP HANA Extended Application Services, Advanced Model 2 3 Build an application based on SAPUI5 or SAP Fiori with Jenkins and deploy the build result to SAP HANA extended application services, advanced model. 4 5 ## Prerequisites 6 7 * [Docker environment](https://docs.docker.com/get-started/) 8 * All artifacts referenced during the build are available either on Service Market Place or via public repositories. 9 * You have set up project “Piper”. See [guided tour](https://sap.github.io/jenkins-library/guidedtour/). 10 * Docker image for xs deployment is locally available. Due to legal reasons, there is no pre-build Docker image. How to create the Docker image is explained [here][devops-docker-images-xs-deploy-readme]. 11 12 ### Project Prerequisites 13 14 This scenario requires additional files in your project and in the execution environment on your Jenkins instance. 15 For details see: [XSA developer quick start guide](https://help.sap.com/viewer/400066065a1b46cf91df0ab436404ddc/2.0.04/en-US/7f681c32c2a34735ad85e4ab403f8c26.html). 16 17 ## Context 18 19 This scenario combines various different steps to create a complete pipeline. 20 21 In this scenario, we want to show how to build a multitarget application (MTA) and deploy the build result into an on-prem SAP HANA XS advances system. This document comprises the [mtaBuild](https://sap.github.io/jenkins-library/steps/mtaBuild/) and the [xsDeploy](https://sap.github.io/jenkins-library/steps/xsDeploy/) steps. 22 23  24 25 **Screenshot: Build and Deploy Process in Jenkins** 26 27 ## Example 28 29 ### Jenkinsfile 30 31 Following the convention for pipeline definitions, use a `Jenkinsfile`, which resides in the root directory of your development sources. 32 33 ```groovy 34 @Library('piper-lib-os') _ 35 36 pipeline { 37 38 agent any 39 40 stages { 41 stage("prepare") { 42 steps { 43 deleteDir() 44 checkout scm 45 setupCommonPipelineEnvironment script: this 46 } 47 } 48 stage('build') { 49 steps { 50 mtaBuild script: this 51 } 52 } 53 stage('deploy') { 54 steps { 55 xsDeploy script: this 56 } 57 } 58 } 59 } 60 ``` 61 62 ### Configuration (`.pipeline/config.yml`) 63 64 This is a basic configuration example, which is also located in the sources of the project. 65 66 ```yaml 67 steps: 68 mtaBuild: 69 buildTarget: 'XSA' 70 xsDeploy: 71 apiUrl: '<API_URL>' # e.g. 'https://example.org:30030' 72 # credentialsId: 'XS' omitted, 'XS' is the default 73 docker: 74 dockerImage: '<ID_OF_THE_DOCKER_IMAGE' # for legal reasons no docker image is provided. 75 # dockerPullImage: true # default: 'false'. Needs to be set to 'true' in case the image is served from a docker registry 76 loginOpts: '' # during setup for non-productive builds we might set here. '--skip-ssl-validation' 77 org: '<ORG_NAME>' 78 space: '<SPACE>' 79 80 ``` 81 82 #### Configuration for the MTA Build 83 84 | Parameter | Description | 85 | -----------------|----------------| 86 | `buildTarget` | The target platform to which the mtar can be deployed. In this case, the target platform is `XSA`. | 87 88 #### Configuration for the Deployment to XSA 89 90 | Parameter | Description | 91 | -------------------|-------------| 92 | `credentialsId` | The Jenkins credentials that contain user and password required for the deployment on SAP BTP.| 93 | `mode` | DeployMode. See [stepDocu](../../../steps/xsDeploy) for more details. | 94 | `org` | The org. See [stepDocu](../../../steps/xsDeploy) for more details. | 95 | `space` | The space. See [stepDocu](../../../steps/xsDeploy) for more details. | 96 97 ### Parameters 98 99 For the detailed description of the relevant parameters, see: 100 101 * [mtaBuild](https://sap.github.io/jenkins-library/steps/mtaBuild/) 102 * [xsDeploy](https://sap.github.io/jenkins-library/steps/xsDeploy/) 103 104 [devops-docker-images-xs-deploy-readme]: https://github.com/SAP/devops-docker-xs-cli/blob/master/README.md#how-to-build-it