Exercise: Configuring a SAP Continuous Integration and Delivery Job

Objectives
After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Configure a job in the SAP Continous Integration and Delivery service

Configure a SAP Continuous Integration and Delivery Job

Usage Scenario

You have enabled SAP Continuous Integration and Delivery for your GitHub repository and for deployment into SAP BTP, Cloud Foundry environment. But until now, you have not told the service what exactly it is supposed to do for you. In this exercise, you will configure a SAP Continuous Integration and Delivery job that executes different tasks, such as building or deploying your application. The job is the actual automation part of this course.

Exercise Options

You can perform this exercise in two ways:

  1. Live Environment – using the instructions provided below, you can perform the tasks in the SAP BTP Free Tier account
  2. Platform Simulation – follow the step-by-step instructions within the simulation
Note
We strongly recommend first performing the tasks in the live environment.

Live Environment

In this exercise, you will perform the following steps:

  1. Create a job
  2. Configure a webhook

Prerequisite

Make sure that by now you have enabled the SAP Continuous Integration and Delivery service for your GitHub repository and for deployment into SAP BTP, Cloud Foundry environment.

Steps

  1. Create a job.

    1. On the Jobs tab in SAP Continuous Integration and Delivery, choose + (Create Job).

    2. Enter the following data:

      KeyValue
      Job Namerisk-management-job
      RepositoryRiskManagement-Repo (prefilled)
      Branchmain
      PipelineSAP Cloud Application Programming Model
    3. Scroll down to Stages and select Job Editor as the Configuration Mode.

    4. Scroll down to Release and toggle Deploy to Cloud Foundry.

      Please be careful here and do not confuse Release with Acceptance.

    5. Provide the respective information. You can find these on your SAP BTP subaccount overview page.

    6. To save this Job configuration, choose Create.

  2. Configure a webhook.

    The goal is for your SAP Continuous Integration and Delivery service job to run whenever there is a change on the main branch of your GitHub repository. To retrieve the information about a change on the repository, you use a webhook. There is a Webhook Event Receiver for your repository in the SAP Continuous Integration and Delivery service, and you need to configure the webhook itself in your GitHub repository.

    1. Open the Repositories tab.

    2. Select your repository, in this case risk-management-repo, and choose Webhook Data.

    3. The Webhook Creation pop-up window appears.

    4. Leave it open and, in your project in GitHub, go to the Settings tab.

    5. From the navigation pane, choose Webhooks or Hooks.

    6. Choose Add webhook.

    7. Enter the Payload URL, Content type, and Secret from the Webhook Creation pop-up in SAP Continuous Integration and Delivery. For all other settings, leave the default values.

    8. Choose Add webhook.

      Now, whenever there is a push event to any branch of your repository, the webhook will be triggered. The webhook then notifies your SAP Continuous Integration and Delivery service, using the specified Payload URL and Secret.

Result

You have configured a SAP Continuous Integration and Delivery job, which automates the build and deployment process of your project.

Log in to track your progress & complete quizzes