In this exercise, you will set up SAP Continuous Integration and Delivery and, in the service, create a job.
-
In your subaccount in the SAP BTP cockpit, choose Services → Service Marketplace.
-
In the text box, enter and search for
continuous
. -
Click on the three dots (...) on the Continuous Integration & Delivery tile and choose Create.
Note: If you don't see the Continuous Integration & Delivery tile when you search for it, please go back to Exercise 0.1 for adding the correct entitlements first and then come back.
- In the New Instance or Subscription pop-up, leave the default settings and choose Create.
-
In your subaccount in the SAP BTP cockpit, choose Security → Users.
-
Choose the arrow > next to your user entry.
-
In the Role Collections overview of your user entry, click on Assign Role Collection or, if the button is not visible, click the three dots (...) and choose Assign Role Collection.
-
Check the boxes for CICD Service Administrator and CICD Service Developer, then click Assign Role Collection.
- In your subaccount in the SAP BTP cockpit, choose Services → Instances and Subscriptions.
- In the Subscriptions overview, choose Continuous Integration & Delivery. Now, the user interface of SAP Continuous Integration and Delivery opens.
Note: If you get an authorization error when trying to access the service, please log out of the service and log back in again.
Connect SAP Continuous Integration and Delivery with the repository in which your sources reside.
- In SAP Continuous Integration and Delivery, choose Repositories → + (Add).
-
In the Add Repository pop-up, add a name for your repository.
-
In GitHub, copy the HTTPS clone URL of the repository you just created in Exercise 0 .
-
Paste it into the Clone URL field in the Add Repository pop-up in SAP Continuous Integration and Delivery.
-
Enter the Name for your repository and leave the rest of the fields as they are.
-
Choose Add.
You can configure a webhook for your repository, which automatically triggers a build of your job when there is a change commit in the source code repository.
- In the Repositories tab in SAP Continuous Integration and Delivery, choose your newly created repository, then choose Webhook Data. As a result, the Webhook Data pop-up opens. This pop-up provides the information you need to create a webhook in GitHub.
- Copy both Payload URL and Secret, then click on the link to your GitHub repository.
-
In your project in GitHub, go to the Settings tab.
-
From the navigation pane, choose Webhooks, then choose Add webhook.
-
Enter the Payload URL, Content type, and Secret from the Webhook Data pop-up in SAP Continuous Integration and Delivery. For all other settings, leave the default values.
-
Choose Add webhook.
- In SAP Continuous Integration and Delivery, go to the Jobs tab and choose + (Create job).
- In the General Information section of the Create Job pane, enter the following values:
- Job Name: Freely choose a unique name for your job. We recommend using a name that contains both your GitHub project name and branch.
- Repository: From the drop-down list, choose your repository you have created.
- Branch: Enter
main
. - Pipeline: From the drop-down list, choose SAP Fiori in the Cloud Foundry environment.
-
In the Stages section, choose Job Editor as Configuration Mode.
-
In the Build section, choose Java 8 Node 14 as Build Tool Version.
-
Choose Create. You've now created your first CI/CD job, in which the Build stage is enabled.
-
To trigger a build of your job, choose Run.
- The successful build looks like the following.
Congratulations! You've now set up SAP Continuous Integration and Delivery, added your GitHub repository to the service, and created and triggered your first CI/CD job.
Continue to - Exercise 2 - Set up SAP Cloud Transport Management