Exercise: Enabling SAP Continuous Integration and Delivery

Objective

After completing this lesson, you will be able to Enable SAP Continuous Integration and Delivery.

Enable SAP Continuous Integration and Delivery

Business Example

In this exercise, you will enable the SAP Continuous Integration and Delivery service for your project.

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.

Prerequisite

Before starting this exercise, ensure you have connected your CAP project to your Git-Repository. This phrase appears in multiple exercises.

Steps

  1. Create and administer an SAP Continuous Integration and Delivery service.

    1. Enter your SAP BTP subaccount. Navigate to the Services tab in the left navigation bar. Go to Service Marketplace.

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

    3. Choose Create.

    4. Accept the default settings and choose Create.

      Note

      The default settings can change from time to time, so yours might differ from the screenshot.

    5. You can Close the Creation in Progress pop-up.

  2. Assign the CICD role collection to your user.

    1. In your SAP BTP subaccount, choose SecurityUsers.

    2. Choose your username.

    3. On the right side, choose Assign Role Collections.

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

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

    1. In your SAP BTP subaccount, navigate to Services and then to Instances and Subscriptions.

    2. Choose the Go to Application icon located next to the Continuous Integration & Delivery subscription.

    3. Use your credentials to log in to the application.

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

      Note

      If 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.
    5. Enter the following data:

      FieldValue
      Namegithub (only lowercase characters permitted)
      TypeBasic Authentication
      UsernameYour GitHub username
      PasswordUse the personal access token that you created in GitHub in the exercise, Create and Connect a Remote Git-Repository
    6. Create a second credential for deploying to the SAP BTP, Cloud Foundry environment.

    7. Enter the following data:

      FieldValue
      Namecfdeploy
      TypeBasic Authentication
      Usernameyour username for the SAP BTP cockpit
      Passworduse your password for the SAP BTP cockpit
  4. 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.

    1. On the Repositories tab in SAP Continuous Integration and Delivery, choose + (Add repository).

    2. 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 RiskManagement-Repo.

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

    4. As Credentials, select github that you created in the previous steps.

    5. Leave the default values in the Webhook Event Receiver section. Make sure that Type is set to GitHub.

    6. To add the repository to your SAP Continuous Integration and Delivery service, select Add.

Result

You have enabled SAP Continuous Integration and Delivery for your project.

Reference Links: Enabling SAP Continuous Integration and Delivery

For your convenience, this section contains the external references in this lesson.

If links are used multiple times within the text, only the first location is mentioned in the reference table.

Ref#SectionContext text fragmentBrief descriptionLink
1ScenarioContinuous Integration PrinciplesContinuous Integration principlesContinuous Integration Principles
2ScenarioContinuous Integration and Continuous Delivery GuideOverview of the continuous integration and delivery conceptsContinuous Integration and Continuous Delivery Guide
3Continuous DeliverySAP BTP Trial AccountSAP BTP CockpitSAP BTP trial account

Note

In this exercise, you find a simulation and a list of all steps displayed in the simulation. Performing the steps below allows you to follow the simulation in your own trial account.

Log in to track your progress & complete quizzes