github.com/jaylevin/jenkins-library@v1.230.4/documentation/docs/scenarios/ui5-sap-cp/Readme.md (about) 1 # Build and Deploy SAPUI5/SAP Fiori Applications on SAP Business Technology Platform (SAP BTP) 2 3 Build an application based on SAPUI5 or SAP Fiori with Jenkins and deploy the build result into an SAP BTP account in the SAP BTP, Cloud Foundry environment. Optionally, deploy the build result into the Neo environment. 4 5 ## Prerequisites 6 7 * You have an account on SAP BTP in the Cloud Foundry environment. See [Accounts](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/8ed4a705efa0431b910056c0acdbf377.html). 8 * You have set up project “Piper”. See [Guided Tour](https://sap.github.io/jenkins-library/guidedtour/). 9 10 ### Project Prerequisites 11 12 This scenario requires additional files in your project and in the execution environment on your Jenkins instance. 13 14 On the project level, provide and adjust the following template: 15 16 | File Name | Description | Position | 17 |-----|-----|-----| 18 | [`mta.yaml`](https://github.com/SAP/jenkins-library/blob/master/documentation/docs/scenarios/ui5-sap-cp/files/mta.yaml) | This file controls the behavior of the [MTA toolset](https://sap.github.io/cloud-mta-build-tool/). | Place the `mta.yaml` file in your application root folder and replace the values in brackets with your data. | 19 20 ## Context 21 22 This scenario combines various different steps to create a complete pipeline. 23 24 In this scenario, we want to show how to build an application based on SAPUI5 or SAP Fiori by using the multitarget application (MTA) concept, and how to deploy the build result into an SAP BTP account in the Cloud Foundry environment. This document comprises the [mtaBuild](../../../steps/mtaBuild/) and the [cloudFoundryDeploy](../../../steps/cloudFoundryDeploy/) steps. 25 26  27 28 **Screenshot: Build and Deploy Process in Jenkins** 29 30 ## Example 31 32 ### Jenkinsfile 33 34 Following the convention for pipeline definitions, use a `Jenkinsfile` which resides in the root directory of your development sources. 35 36 ```groovy 37 @Library('piper-lib-os') _ 38 39 fioriOnCloudPlatformPipeline script:this 40 ``` 41 42 [fioriOnCloudPlatformPipeline](https://sap.github.io/jenkins-library/steps/fioriOnCloudPlatformPipeline) is a so called _scenario step_ that wraps mainly the [mtaBuild](https://sap.github.io/jenkins-library/steps/mtaBuild/) step and the [cloudFoundryDeploy](https://sap.github.io/jenkins-library/steps/cloudFoundryDeploy/) step. 43 44 ### Scenario Configuration 45 46 This is a basic configuration example, which also resides in the sources of the project. Edit `.pipeline/config.yml` below the root directory. The configuration corresponds to the steps wrapped in `fioriOnCloudPlatformPipeline`. For more information, see [mtaBuild](https://sap.github.io/jenkins-library/steps/mtaBuild/) and [cloudFoundryDeploy](https://sap.github.io/jenkins-library/steps/cloudFoundryDeploy/). 47 48 ```yaml 49 steps: 50 mtaBuild: 51 platform: 'CF' 52 cloudFoundryDeploy: 53 cloudFoundry: 54 apiEndpoint: 'your-cf-endpoint' # default: 'https://api.cf.eu10.hana.ondemand.com' 55 org: 'your-org-id' 56 space: 'your-space-id' 57 credentialsId: 'CF-jenkins-credentials-id' 58 ``` 59 60 ### Optional environment 61 62 Optionally, you can use [fioriOnCloudPlatformPipeline](https://sap.github.io/jenkins-library/steps/fioriOnCloudPlatformPipeline) to deploy your build result into the Neo environment. For more information, see [neoDeploy](https://sap.github.io/jenkins-library/steps/neoDeploy/). 63 64 ```yaml 65 steps: 66 mtaBuild: 67 platform: 'NEO' 68 neoDeploy: 69 neo: 70 credentialsId: 'NEO-jenkins-credentials-id' 71 account: 'your-account-id' 72 host: 'hana.ondemand.com' 73 ``` 74 75 ### Parameters 76 77 For the detailed description of the relevant parameters, see: 78 79 * [fioriOnCloudPlatformPipeline](https://sap.github.io/jenkins-library/steps/fioriOnCloudPlatformPipeline/) 80 * [mtaBuild](https://sap.github.io/jenkins-library/steps/mtaBuild/) 81 * [cloudFoundryDeploy](https://sap.github.io/jenkins-library/steps/cloudFoundryDeploy/) 82 * [neoDeploy](https://sap.github.io/jenkins-library/steps/neoDeploy/)