In this exercise, you will enable the SAP Continuous Integration and Delivery service for your project.
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
Before starting this exercise, ensure you have connected your CAP project to your Git-Repository. This phrase appears in multiple exercises.
Create and administer an SAP Continuous Integration and Delivery service.
Enter your SAP BTP subaccount. Navigate to the Services tab in the left navigation bar. Go to Service Marketplace.
In the search box, enter Continuous Integration & Delivery. If the tile is displayed, select it.Note
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 Creation in Progress pop-up.
Assign the CICD role collection to your user.
In your SAP BTP subaccount, choose Security → Users.
Choose your username.
On the right side, choose 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 SAP 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.
On 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. In addition, note to use your personal access token (PAT) instead of your GitHub password.
Enter the following data:
Field Value Name GitHub Type Basic Authentication Username Your GitHub username Password Use the personal access token that you created in GitHub in the exercise, Create and Connect a Remote Git-Repository
Create a second credential for deploying to the SAP BTP, Cloud Foundry environment.
Enter the following data:
Field Value Name cfdeploy Type Basic Authentication Username your username for the SAP BTP cockpit Password use your password for the SAP BTP cockpit
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.
On 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
To add the repository to your SAP Continuous Integration and Delivery service, select Add.
You have enabled SAP Continuous Integration and Delivery for your project.