Artificial Intelligence Blogs Posts
cancel
Showing results for 
Search instead for 
Did you mean: 

When working on SAP Cloud Integration, it is a good practice to keep a backup of your integration flows and other artifacts outside the tenant. Git helps us do this in a simple way. Every time we make a change, we can save a version in a Git repository. If something goes wrong later, we can refer to an older version.

In this blog, I will explain how to connect SAP Cloud Integration with GitHub and use it to back up integration artifacts. This setup is mainly for storing design-time artifacts .

What We Need Before Starting

Before starting, make sure you have:

  • Access to SAP Integration Suite with Cloud Integration enabled
  • Permission to create or edit integration artifacts
  • A GitHub account
  • A GitHub repository
  • A GitHub Personal Access Token

If you do not have a GitHub account, do not worry. The first few steps explain how to create one.

You can read my previous blogs here on SAP TMS , SAP ANS and HANA DB Integration with Cloud Integration.

Content Transport Using SAP Cloud Transport Management Service for SAP CI CF Environment

Setting Up Alerts for SAP Cloud Integration Using SAP Alert Notification Service 

SAP HANA Cloud Activation on SAP BTP and Database Operations Using JDBC from Cloud Integration

Step 1: Create a GitHub Account

  1. Open GitHub.
  2. Click Sign up.
  3. Enter your email address, password, and username.
  4. Complete the email verification.
  5. Log in to GitHub.

For learning purposes, you can use your personal GitHub account. If you are working for a company, it is better to use a company GitHub organization and follow your company’s security guidelines.

Step 2: Create a Repository in GitHub

A repository is like a folder in GitHub where all backup files and their versions will be stored.

  1. After logging in to GitHub, click the + icon in the top-right corner.

  2. Select New repository. 

    Nikhil_Gursal_1-1789637877108.png
  3. Enter a repository name.

    For example: 

    sap-cloud-integration-backup
  4. Add a short description if required:

    Repository for SAP Cloud Integration artifact backup
  5. Select visibility Private. This is recommended because integration artifacts may contain technical details that should not be publicly visible.

  6. Select Add a README file.

  7. Click Create repository.

Nikhil_Gursal_2-1789638005385.png

Nikhil_Gursal_3-1789638105296.png

After the repository is created, copy the HTTPS repository URL. It will look similar to this:

Nikhil_Gursal_4-1789638240090.png

https://github.com/NIKHILGURSAL/sap-cloud-integration-backup.git

Keep this URL ready. We will use it while configuring Git in SAP Cloud Integration in Step 4.

Step 3: Create a GitHub Personal Access Token

SAP Cloud Integration needs a secure way to connect to GitHub. GitHub does not allow normal account passwords for this purpose. Instead, we use a Personal Access Token.

Think of this token as a special password created only for SAP Cloud Integration.

  1. In GitHub, click your profile picture in the top-right corner.
  2. Select Settings.
  3. Scroll down in the left menu and select Developer settings.
  4. Select Personal access tokens.
  5. Select Fine-grained tokens.
  6. Click Generate new token.

Fill in the details as follows:

  • Token name: SAP Cloud Integration Backup
  • Expiration: Choose an expiry period based on your requirement. For learning, 90 days is fine.
  • Resource owner: Select your GitHub account.
  • Repository access: Choose Only select repositories.
  • Select the repository created in the previous step.

Under Repository permissions, give the following permission:

Permission Access

ContentsRead and write
MetadataRead-only

Nikhil_Gursal_8-1789638684231.png

Click Generate token.

GitHub will now show the token. Copy it immediately and keep it in a safe place.

Nikhil_Gursal_12-1789638918272.png

GitHub shows the token only once. If you close the page without copying it, you must create a new token. Do not share this token with anyone and do not add it to an integration flow, script, email, or document.

Step 4: Configure the Git Repository in Cloud Integration

  1. Go To Integration Suite->Settings->Integrations->GIT Access->Edit

Nikhil_Gursal_0-1789650430689.png

2. Click Add  and update GIT Repository HTTP URL from step 2 and Personal Access Token (PAT) from Step 3 and click on connect. 

Repository name and details will be updated automatically  and click add and save the changes.

Nikhil_Gursal_1-1789650625482.png

Nikhil_Gursal_2-1789650777015.png


Step 5: Choose the Integration Package to Back Up

  1. Go to Integration Suite -> Design->Integrations and API ->Select Package you want to backup 
  2. If you do not have a package and iflow then create it.

Nikhil_Gursal_3-1789651027551.png

Nikhil_Gursal_0-1789651983749.png

Save the integration flow once it is created.


Step 6: Push the Artifact to GitHub

After the Git repository is configured and the integration artifact is saved, you can push it to GitHub.

  1. Open the package or artifact that you want to back up ->Actions->Git Push

Nikhil_Gursal_4-1789651188738.png

Nikhil_Gursal_5-1789651302686.png

Update details of Token , Repository name and commit message and click push. You will get pop up of Artifact pushed.


Step 7: Check the Backup in GitHub

Let us confirm that the backup was successful.

  1. Open GitHub.

  2. Open your repository:

     
    sap-cloud-integration-backup
  3. Refresh the page.

  4. You should see files and folders created by SAP Cloud Integration. 

    Nikhil_Gursal_7-1789651572492.png
  5. Click Commits to see the version history.

Nikhil_Gursal_8-1789651656435.png

You should find the commit message entered in the previous step


Step 8: Pull the artifact from GitHub 

A. Import Iflow to different Tenant ( For Example Push performed in Dev and we need to Import (Pull) this in QAS Tenant )

In QAS tenant create package with same name as Dev and perform Git Import. Here I'm performing this in same Dev tenant hence getting error for  iflow id.

Nikhil_Gursal_0-1789655591830.png

Nikhil_Gursal_1-1789655805432.png

B. Make some changes in GIT Repository artifact and then perform Git Pull.

I have modified groovy script in Git repository in resources for groovy script and performed Commit

Nikhil_Gursal_3-1789656805608.png

Nikhil_Gursal_4-1789656881515.png

Verify the commit

Nikhil_Gursal_5-1789656920931.png

Now preform the Git pull to see the changes made and sync Cloud Integration with Git

You will see artifact pulled pop up.

Nikhil_Gursal_6-1789657030660.png

Verify the changes in the iflow for groovy. Changes are visible in the iflow.

Nikhil_Gursal_7-1789657112833.png


Conclusion

Using Git with SAP Cloud Integration is a simple and reliable way to maintain a history of integration artifacts. It gives us a backup outside the tenant and helps us understand changes over time.

By following this process regularly, you will always have a version history of your SAP Cloud Integration artifacts and a safer way to manage changes.

Reference 

Integrating with Git

Regards,

Nikhil

Labels in this area