SAP Commerce Cloud (CCV2) — Azure CICD Pipeline

Aswin Raghuraman
SAP Commerce Cloud
Published in
3 min readJun 5, 2022

SAP Commerce Cloud is a highly customizable, extension/module based, flexible & scalable eCommerce Platform which is used by lot of high-end customers like Samsung, etc. It can be either hosted in our own cloud/on-premises environment or on the SAP supported cloud environment. The SAP supported PaaS provides all the infrastructure required to host the eCommerce Platform and run the eCommerce website.

The previously released CCV1 is based on SAP Cloud and it had lot of limitations. Later, SAP moved on to public cloud infrastructure ( Microsoft Azure Cloud) to host the SAP Commerce cloud. And its called CCV2. The customer can integrate their git repo and manually build & deploy the code from the SAP Commerce portal to host their website without any downtime of storefront/OCC APIs, which is a BIG win.

To automate the whole process, SAP has recently released Commerce Cloud APIs to build, deploy and track the progress. In this tutorial, we will create a readily executable CICD Azure DevOps pipeline using APIs. Lets get started!

Azure DevOps Pipeline

The below four stages are created in the pipeline to accomplish the task.

Follow the steps to create the pipeline

  1. Create Pipeline

2. Create or use the existing repo

3. Configure the pipeline

Click Starter Pipeline

4. Create the pipeline

The APIs will need few parameters and API tokens to invoke. Instead of hardcoding those, the Azure DevOps secrets & parameters can be used to get the user inputs.

Parameters

Branch Name, Build name, DB Update Mode , deployment strategy and environment details can be accessed through the user input from Azure Pipeline.

For eg.,

parameters:
- name: BRANCH_NAME
displayName: Branch Name
type: string
default: develop

Variables

For execute the pipeline, the below variables should be created within Azure Pipeline

Click the Variables button on the right side

Add the below variables

These variables are used in pipeline to invoke the APIs.

CCV2_AUTH_ACCESS_TOKEN — Create the API Access Token from your SAP Account here [ Check the option: keep this value secret]

CCV2_SUBSCRIPTION_CODE — Add your SAP Commerce subscription code here

ccv2_url https://portalapi.commerce.ondemand.com/v2/subscriptions

YAML File

Remove all the lines from the starter pipeline yaml and add the below code

After your save the pipeline to your repo and click Run the pipeline.

It should look like this

5. Run the pipeline

Now you can provide your details and select the options to run the pipeline.

The build and deploy will be executed in stages and the deployment should get completed.

A successfully ran build will look like below

On failure or success, the invoker of the build will receive notifications from Azure DevOps.

Conclusion

The provided step by step process and code in the tutorial will enable you to run the pipeline in minutes. Hope you enjoyed reading this post.

Kindly like my post if you have learned something new and follow me to get more posts on SAP Commerce.

--

--

Aswin Raghuraman
SAP Commerce Cloud

eCommerce expert, Solution Architect and Developer. Knowledge on multiple platforms SAP commerce Cloud, BigCommerce, AEM, Celum and Azure Cloud DevOps