Skip to Content

Set Up a CI/CD Pipeline for SAP BTP, Cloud Foundry Runtime

This section describes how to configure and run a predefined continuous integration and delivery (CI/CD) pipeline that automatically tests, builds, and deploys your code changes to speed up your development and delivery cycles.
You will learn
  • How to initialize a repository in SAP Business Application Studio.
  • How to set up your CI/CD pipeline.
slavipandeSvetoslav PandelievSeptember 4, 2025
Created by
slavipande
October 12, 2023
Contributors
PlamiIG
slavipande

Prerequisites

This tutorial follows the guidance provided in the SAP BTP Developer’s Guide.

  • Step 1

    To be able to perform the steps for setting up a CI/CD pipeline, you need a public repository. Currently, SAP Continuous Integration and Delivery supports GitHub and Bitbucket repositories.

    For real application development, you need to consider the right place for your repository.

    In this example, we’re creating a repository on GitHub. You need a GitHub account for this step. Go ahead and create one if you don’t have it yet.

    1. Create a new GitHub repository in your GitHub account.

    2. Under Repository name, enter incident-management.

    3. Choose Create repository.

      Create repository
    4. You’re directed to the Quick Setup page of your new repository. Make sure to copy the URL of the repository as you’ll need it in the next steps.

      Quick Setup
  • Step 2
    1. In SAP Business Application Studio, navigate to Source Control and choose Initialize Repository.

      Initialize repository
    2. In the dropdown Pick workspace folder to initialize git repo in, choose the incident-management folder.

      Pick workspace folder
    3. Open the three dots menu next to Source Control and choose RemoteAdd Remote….

      Add remote
    4. Paste the URL of your repository in the Provide repository URL field and press Enter.

      Provide repo URL
    5. Provide a remote name and press Enter.

      Provide remote name
    6. Stage your changes, add a commit message, and choose Publish Branch.

      Publish branch
    7. Provide your GitHub username and password when prompted. When the changes are pushed, you see your project in your GitHub repository.

  • Step 3
    1. Navigate to your subaccount and choose ServicesService Marketplace on the left.

    2. Type Continuous Integration & Delivery in the search box and choose Create.

      Continuous Integration and Delivery create service
    3. Choose Create in the New Instance or Subscription popup without changing any values.

      New Instance or Subscription popup
    4. Choose View Subscription and wait until the status changes to Subscribed.

      View subscription
      Status subscribed
    5. In your SAP BTP subaccount, choose SecurityRole Collections in the left-hand pane.

    6. Choose role collection CICD Service Administrator.

    7. Choose Edit.

      Edit role
    8. In the Users section, enter your user and select the icon to add the user.

      Add user

      Keep the setting Default Identity Provider unless you have a custom identity provider configured.

    9. Choose Save.

      You’ve assigned the CICD Service Administrator role collection to your user.

    Log out and log back in to make sure your new role collection is considered.

    See Initial Setup for more details on how to enable the service.

  • Step 4
    1. In your SAP BTP subaccount, navigate to ServicesInstances and Subscriptions in the left-hand pane.

    2. Choose Continuous Integration & Delivery.

      CI/CD Go to application
    3. Use your SAP BTP global user name and global password to log in to the application.

  • Step 5
    1. Choose the Credentials tab and choose the icon to add a new credential.

      Add new credential
    2. Under Create Credentials on the right:

      • Enter github in the Credential Name field.
      • Choose Basic Authentication from the dropdown in the Type field.
      • Enter your GitHub user name in the Username field.
      • Enter your GitHub personal access token in the Password field.
      • Choose Create.

      See Create a Credential for a Private GitHub Repository for instructions on how to create a GitHub personal access token if you don’t have one.

      Create GitHub credential
    3. Choose the icon to add a new credential again and create a credential for Cloud Foundry:

      • Enter cf in the Credential Name field.
      • Choose Basic Authentication from the dropdown in the Type field.
      • Enter your SAP BTP global user name in the Username field.
      • Enter your SAP BTP global password in the Password field.
      • Choose Create.
      configure pipeline
  • Step 6
    1. Navigate to the Jobs tab and choose the icon to add a new job.

      Add new job
    2. Enter Incident-Management in the Job Name field.

    Add repository

    1. Open the value help for the Repository field.

      Add job name
    2. In the Select Repository popup, choose Add Repository. A popup opens.

      Select Repository popup
    3. In the Add Repository popup, enter details for the repository you created in Step 1: Create a repository:

      • Enter incident-management in the Name field.
      • Enter your repository’s URL in the Clone URL field.
      • Open the value help in the Credentials field and choose the credential github that you created in Step 5: Add credentials.
      • Select GitHub from the dropdown in the Type field.
      Add Repository popup

    Create credentials

    1. Open the value help in the Webhook Credential field.

      Create Webhook value help
    2. In the Select Credentials popup, choose Create Credentials.

      Select Credentials popup
    3. In the Create Credentials popup:

      • Enter webhook in the Credentials Name field.
      • Click Generate next to the Secret field to create a secret.
      • Copy the generated secret from the Secret field and save it. You need it in Step 7: Create a GitHub webhook.
      • Choose Create.
      Create webhook
    4. Go back in the Add Repository popup and choose Add to complete the addition of a repository.

      Complete repo addition

    Configure pipeline and stages

    How many different credentials do you need to create when adding a CI/CD job?

  • Step 7
    1. Navigate to the Repositories tab and choose the incident-management repository that you created. Under the Webhook Event Receiver tab, choose Webhook Data.

      Incident-Management repo
    2. In the Webhook Creation popup, find the Payload URL field and copy its value.

      Webhook Data popup
    3. Go to your repository on GitHub and open the Settings tab.

    4. From the navigation pane on the left, choose WebhooksAdd webhook.

      Add webhook
    5. Insert the data for your webhook:

      • Paste the incident-management repository’s payload URL that you copied from the Webhook Creation popup in the Payload URL field.
      • Select application/json from the dropdown in the Content type field.
      • Paste the secret that you created in Step 6: Add a CI/CD job in the Secret field.
      • Under Which events would you like to trigger this webhook, select Just the push event.
      • Choose Add webhook.
      Configure webhook
  • Step 8
    1. You have to trigger your job manually the first time after creation. Go back to the SAP Continuous Integration and Delivery application and navigate to the Jobs tab.

    2. Choose the Incident-Management job and choose Run.

      Run job
    3. Verify that a new tile appears in the Builds view. This tile is marked as running.

      Build running
    4. Wait until the job has finished and verify that the build tile is marked as successful.

      Build successful
Back to top