mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
parent
e48b5c588e
commit
0afc5dd1bd
Binary file not shown.
Before Width: | Height: | Size: 127 KiB |
@ -1,47 +1,39 @@
|
||||
# Build and Deploy SAP Cloud Application Programming Model Applications
|
||||
|
||||
In this scenario, we will setup a CI/CD Pipeline for a SAP Cloud Application Programming Model (CAP) project, which is based on the _SAP Cloud Platform Business Application_ WebIDE Template.
|
||||
In this scenario, we will setup a CI/CD Pipeline for a SAP Cloud Application Programming Model (CAP) project.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* You have an account on SAP Cloud Platform in the Cloud Foundry environment. See [Accounts](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/8ed4a705efa0431b910056c0acdbf377.html).
|
||||
* You have the SAP Cloud Application Programming Model command line tool (cds-dk) installed: See [Get Started](https://cap.cloud.sap/docs/get-started/#local-setup).
|
||||
* You have setup a suitable Jenkins instance as described in [Guided Tour](../guidedtour.md)
|
||||
|
||||
## Context
|
||||
|
||||
The Application Programming Model for SAP Cloud Platform is an end-to-end best practice guide for developing applications on SAP Cloud Platform and provides a supportive set of APIs, languages, and libraries.
|
||||
For more information about the SAP Cloud Application Programming Model, see [Working with the SAP Cloud Application Programming Model](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/00823f91779d4d42aa29a498e0535cdf.html).
|
||||
For more information about the SAP Cloud Application Programming Model, visit its [documentation](https://cap.cloud.sap/docs/about/).
|
||||
|
||||
## Getting started
|
||||
|
||||
To get started, generate a project in SAP Web IDE based on the _SAP Cloud Platform Business Application_ template.
|
||||
Make sure to check the Include support for continuous delivery pipeline of SAP Cloud SDK checkbox, as in this screenshot:
|
||||
To get started, generate a project using the SAP Cloud Application Programming Model command line tools:
|
||||
|
||||
![WebIDE project wizard](../images/webide-pipeline-template.png)
|
||||
```
|
||||
cds init bookshop --add java,mta,samples,hana
|
||||
```
|
||||
|
||||
This will generate a project which already includes a `Jenkinsfile`, and a `pipeline_config.yml` file.
|
||||
Alternatively you can also reuse an existing project. To include support for continuous delivery, you can execute the command `cds add pipeline` in the directory in which you have created your project:
|
||||
|
||||
!!! note "New location of pipeline configuration file"
|
||||
The SAP Cloud SDK Pipeline recently changed the default location for the configuration file from `pipeline_config.yml` to `.config/pipeline` to have a consistent user experience with other piper pipelines.
|
||||
For a limited amount of time starting with version v29 both locations can be used.
|
||||
In the following the configuration file is referenced by its new location.
|
||||
```
|
||||
cd bookshop
|
||||
cds add pipeline
|
||||
```
|
||||
|
||||
In case you already created your project without this option, you'll need to copy and paste two files into the root directory of your project, and commit them to your git repository:
|
||||
|
||||
* [`Jenkinsfile`](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/archetype-resources/Jenkinsfile)
|
||||
* [`.pipeline/config.yml`](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/archetype-resources/cf-pipeline_config.yml)
|
||||
* Note: The file must be named `.pipeline/config.yml`, despite the different name of the file template
|
||||
|
||||
!!! note "Using the right project structure"
|
||||
This only applies to projects created based on the _SAP Cloud Platform Business Application_ template after September 6th 2019. They must comply with the structure which is described [here](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/doc/pipeline/build-tools.md#sap-cloud-application-programming-model--mta).
|
||||
|
||||
If your project uses SAP HANA containers (HDI), you'll need to configure `createHdiContainer` and `cloudFoundry` in the `backendIntegrationTests` stage in your `.pipeline/config.yml` file as documented [here](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/configuration.md#backendintegrationtests)
|
||||
This will generate a project which already includes a `Jenkinsfile`, and a `.pipeline/config.yml` file.
|
||||
|
||||
Now, you'll need to push the code to a git repository.
|
||||
This is required because the pipeline gets your code via git.
|
||||
This might be GitHub, or any other cloud or on-premise git solution you have in your company.
|
||||
|
||||
Be sure to configure the [`productionDeployment`](https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/configuration.md#productiondeployment) stage so your changes are deployed to SAP Cloud Platform automatically.
|
||||
Afterwards you can connect your Jenkins instance to your git repository and let it build the project.
|
||||
|
||||
## Legacy documentation
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user