Skip to content

Latest commit

 

History

History

ex1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Exercise 1 - Create a Job in the SAP Continuous Integration and Delivery service

In this exercise, you will set up SAP Continuous Integration and Delivery and, in the service, create a job.

Exercise 1.0 - Set Up SAP Continuous Integration and Delivery

Subscribe to SAP Continuous Integration and Delivery

  1. In your subaccount in the SAP BTP cockpit, choose ServicesService Marketplace.

  2. In the text box, enter and search for continuous.

  3. 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.

  1. In the New Instance or Subscription pop-up, leave the default settings and choose Create.

Add the Required Permissions

  1. In your subaccount in the SAP BTP cockpit, choose SecurityUsers.

  2. Choose the arrow > next to your user entry.


  3. 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.


  4. Check the boxes for CICD Service Administrator and CICD Service Developer, then click Assign Role Collection.


Open the Continuous Integration and Delivery Service

  1. In your subaccount in the SAP BTP cockpit, choose ServicesInstances and Subscriptions.


  1. 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.

Exercise 1.1 Add Your Repository to SAP Continuous Integration and Delivery

Connect SAP Continuous Integration and Delivery with the repository in which your sources reside.

  1. In SAP Continuous Integration and Delivery, choose Repositories+ (Add).


  1. In the Add Repository pop-up, add a name for your repository.

  2. In GitHub, copy the HTTPS clone URL of the repository you just created in Exercise 0 .


  1. Paste it into the Clone URL field in the Add Repository pop-up in SAP Continuous Integration and Delivery.

  2. Enter the Name for your repository and leave the rest of the fields as they are.

  3. Choose Add.


Exercise 1.2 (Optional) Create a Webhook

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.

  1. 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.


  1. Copy both Payload URL and Secret, then click on the link to your GitHub repository.


  1. In your project in GitHub, go to the Settings tab.

  2. From the navigation pane, choose Webhooks, then choose Add webhook.


  1. 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.

  2. Choose Add webhook.


Exercise 1.3 Create and Trigger a Job in SAP Continuous Integration and Delivery

  1. In SAP Continuous Integration and Delivery, go to the Jobs tab and choose + (Create job).


  1. 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.
  1. In the Stages section, choose Job Editor as Configuration Mode.

  2. In the Build section, choose Java 8 Node 14 as Build Tool Version.


  1. Choose Create. You've now created your first CI/CD job, in which the Build stage is enabled.

  2. To trigger a build of your job, choose Run.


  1. The successful build looks like the following.


Summary

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