In this exercise, you will enable the SAP Continuous Integration and Delivery (CI/CD) service for your project.
Continuous integration (CI) describes a software development process in which various team members integrate their contributions frequently into a single main line. Before each integration, the changes are verified through builds and automated testing. Thereby, you can detect errors as quickly as possible and prevent integration problems before completing the development.
Continuous delivery (CD) adds the aspect that any change that has successfully passed the tests is immediately ready to be deployed to production, both from a technical and a qualitative point of view.
For more information about CI/CD such as CI principles and process flows, see:
You can perform this exercise in two ways:
- Live Environment – using the instructions provided below, you can perform the tasks in the SAP BTP Free Tier account
- Platform Simulation – follow the step-by-step instructions within the simulation
In this exercise, you will perform the following steps:
- Create and Administer Continuous Integration and Delivery Service.
- Configure Credentials in SAP Continuous Integration and Delivery Service.
- Configure the GitHub Repository in SAP Continuous Integration and Delivery Service.
Please make sure that by this moment you have connected your CAP project to your GitHub repository.
Create and Administer Continuous Integration and Delivery Service.
Enter your SAP BTP account. In Account Explorer, under Directories and Subaccounts, select your subaccount and navigate to the Services tab in the left navigation bar. Go to Service Marketplace.
Enter Continuous Integration & Delivery in the search box. If the tile is displayed, select it and proceed to substep c.
If the tile does not display, it must be entitled. To achieve this, select Entitlements in the left bar of your subaccount, then on the upper-right side, select Configure Entitlements, then Add Service Plans. A pop-up displays. On the left side of the pop-up, select the Continuous Integration & Delivery entitlement and on the right side select the trial flag. Confirm the pop-up (select Add 1 Service Plan). Navigate back to the Service Marketplace of your subaccount and try again. The tile should now display.
Accept the default settings and choose Create.Note
The default settings can change from time to time, so yours might differ from the screenshot.
You can Close the pop-up Creation in Progress.
In your SAP BTP subaccount, choose Security → Users.
Choose your username.
On the right side, click on Assign Role Collections.
From the list, select CICD Service Administrator and choose Assign Role Collection.
Your user is now authorized to use and administer the Continuous Integration and Delivery service.
Configure Credentials in SAP Continuous Integration and Delivery.
The SAP Continuous Integration and Delivery service will act as an automation tool. It will retrieve the latest state of your GitHub repository, build your project, and deploy it to your SAP BTP, Cloud Foundry environment. You need to configure GitHub and SAP BTP credentials for the service to be able to connect to these environments.
In your SAP BTP subaccount, navigate to Services and then to Instances and Subscriptions.
Choose the Go to Application icon located next to the Continuous Integration & Delivery subscription.
Use your credentials to log in to the application.
In the Credentials tab in SAP Continuous Integration and Delivery, choose + (Create Credentials).
If your GitHub repository is private, configure credentials for it so that the Continuous Integration & Delivery service can connect to it.NoteIf your GitHub repository is not private, you can skip this step.
Enter the following data:
Field Value Name <a freely chosen name for your credential, which is unique in your SAP BTP subaccount>. In this example, the name of the credential is
Type <select> Basic Authentication Username <your GitHub username> Password <use the personal access token, which you've created in GitHub in a previous exercise>
To create credentials for deploying to the SAP BTP, Cloud Foundry environment, go to the Credentials tab and choose + (Create Credentials).
Enter the following data:
Field Value Name <enter a freely chosen name for your credentials, which is unique in your SAP BTP subaccount.> In this example, the name of the credentials is
Type <select> Basic Authentication Username <your username for the SAP BTP cockpit> Password <use your password for the SAP BTP cockpit>
Your result will look like this:
Configure the GitHub Repository in SAP Continuous Integration and Delivery.
The SAP Continuous Integration and Delivery service can manage multiple repositories. You need to configure your GitHub repository so that the service is able to retrieve sources from it.
In the Repositories tab in SAP Continuous Integration and Delivery, choose + (Add repository).
For Name, enter a freely chosen name for your repository, which is unique in your SAP BTP subaccount. In this example, the name of the repository is
As Clone URL, enter the HTTPS Clone URL of your GitHub repository. Find it by selecting the green Code button in your GitHub repository. Choose the Clipboard icon to copy the URL.
As Credentials, select
githubthat you created in the previous steps.
Leave the default values in the Webhook Event Receiver section. Make sure that Type is set to
Select Add to add the repository to your SAP Continuous Integration and Delivery service.
Click on the Start button below to open a simulation of the platform. Then follow the step-by-step instructions to enable SAP continuous integration and delivery.ExerciseStart Exercise
You have enabled SAP Continuous Integration and Delivery for your project.