Developing with SAP Extension Suite

Enabling SAP Continuous Integration and Delivery

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

After completing this lesson, you will be able to:

  • Enable SAP Continuous Integration and Delivery

Enable SAP Continuous Integration and Delivery: Exercise Overview

Scenario

In this exercise, you will enable the SAP Continuous Integration and Delivery (CI/CD) service for your project.

Continuous integration (CI) describes a software development process, in which various team members integrate their contributions frequently into a single main line. Before each integration, the changes are verified through builds and automated testing. Thereby, you can detect errors as quickly as possible and prevent integration problems before completing the development.

Continuous delivery (CD) adds the aspect that any change that has successfully passed the tests is immediately ready to be deployed to production, both from a technical and a qualitative point of view.

For more information about CI/CD such as CI principles and process flows, see:

Task Flow

In this exercise, you will perform the following tasks:

  • Subscribe to SAP Continuous Integration and Delivery.
  • Assign the Administrator role to your user.

Prerequisite

You have connected your CAP project to your GitHub repository.

Watching the Simulation and/or Performing the Steps

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.

Enable SAP Continuous Integration and Delivery

Exercise

Enable SAP Continuous Integration and Delivery

Start Exercise

Task 1: Create and Administer Continuous Integration and Delivery Service

Steps

  1. Create and Administer Continuous Integration and Delivery Service.

    1. Enter your SAP BTP trial account3, choose Enter Your Trial Account, choose the trial tile and navigate to the Services tab. Go to Service Marketplace.

    2. Enter Continuous Integration & Delivery in the search box. If the tile is displayed, select it and proceed to substep c.

      If the tile does not displays, it must be entitled. To achieve this, select Entitlements in the left bar of your trial 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 trial subaccount and try again. The tile should now display.

    3. Choose Create.

    4. Accept the default settings and choose Create.

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

    6. In your SAP BTP subaccount, choose SecurityTrust Configuration.

    7. Choose the name of your identity provider (For example, 'Default identity provider' in this case).

    8. Enter your email address.

    9. Choose Show Assignments. (If your user is new to your subaccount, choose Add User in the confirmation dialog.)

    10. Choose Assign Role Collection.

    11. From the list, select CICD Service Administrator and choose Assign Role Collection.

      Your user is now authorized to use and administer the Continuous Integration and Delivery service.

Task 2: Configure Credentials in SAP Continuous Integration and Delivery

Steps

  1. 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. In 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 isn't private, you can skip this step.
    5. Enter the following data:

      FieldValue
      Name<a freely chosen name for your credential, which is unique in your SAP BTP subaccount>. In this example, the name of the credential is github.
      Type<select> Basic Authentication
      Username<your GitHub username>
      Password<use the personal access token, which you've created in GitHub in a previous exercise>
    6. To create credentials for deploying to the SAP BTP, Cloud Foundry environment, go to the Credentials tab and choose + (Create Credentials).

    7. Enter the following data:

      FieldValue
      Name<enter a freely chosen name for your credentials, which is unique in your SAP BTP subaccount.> In this example, the name of the credentials is cfdeploy
      Type<select> Basic Authentication
      Username<your username for the SAP BTP cockpit>
      Password<use your password for the SAP BTP cockpit>
    8. Your result will look like this:

Task 3: Configure the GitHub Repository in SAP Continuous Integration and Delivery

Steps

  1. 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. In 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 risk-management-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. Select Add to add the repository to your SAP Continuous Integration and Delivery service.

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.

Reference Links: Enable SAP Continuous Integration and Delivery

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.

Save progress to your learning plan by logging in or creating an account