Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Project “Piper”, SAP’s open-source solution for continuous integration and delivery, does not only contain a shared library with steps, scenarios, and utilities for Jenkins pipelines but also a set of Docker images for implementing CI/CD best practice processes. However, just like our shared library, these images were quite limited to Jenkins and typical project “Piper” use cases. But what if you want to use your own CI tool, such as Azure DevOps, together with an SAP-specific pipeline?

If that’s the case, we have good news for you: We’ve started to rework and decouple our Docker images so that as a first result, you can use project “Piper” out-of-the-box together with Azure DevOps. We now provide a CI/CD pipeline with build, test, and deploy steps for classical SAP UI5 applications on Azure DevOps in the Cloud Foundry environment.

How can you use our CI/CD pipeline?

  1. In your project sources, create a yml-file named azure-pipelines.yml and copy the following code into it:
    # Starter pipeline
    # Start with a minimal pipeline that you can customize to build and deploy your code.
    # Add steps that build, run tests, deploy, and more:

    name: cd-openui5-sample-app
    - container: mta
    image: 'ppiper/mta-archive-builder:latest'
    options: --user 0:0
    - container: cfcli
    image: 'ppiper/cf-cli'
    options: --user 0:0 --privileged
    - container: node
    image: 'geekykaran/headless-chrome-node-docker:latest'
    options: --privileged

    - master

    - stage: build
    displayName: Build MTA for SAP Cloud Platform
    - job: build
    vmImage: 'ubuntu-latest'
    container: mta
    - bash: 'mtaBuild --build-target CF --mtar MySampleApp.mtar build'
    - publish: $(System.DefaultWorkingDirectory)/.
    artifact: WebApp

    - stage: test
    displayName: Run Karma Test Suite
    - job: test
    vmImage: 'ubuntu-latest'
    container: node
    - bash: 'cd MySampleApp && npm config set @sap:registry "" && npm install && npm run-script test'
    - publish: $(System.DefaultWorkingDirectory)/.
    artifact: TestResult

    - stage: deploy
    displayName: Deployment to SAP Cloud Platform (cf)
    - job: deploy
    vmImage: 'ubuntu-latest'
    container: cfcli
    - download: current
    artifact: WebApp
    - bash: 'cf login -u "$(CF-USER)" -p "$(CF-PASSWORD)" -a "$(CF-API)" -o "$(CF-ORG)" -s "$(CF-SPACE)" && cf deploy $(Pipeline.Workspace)/WebApp/MySampleApp.mtar -f'

  2. In Azure DevOps, define variables for the secrets in the code (CF-USER, CF-PASSWORD, CF-API, CF-ORG, CF-SPACE).

Done! And the greatest thing about it? You can extend your pipeline by adding any desired Docker container.

Do you want to know how others have experienced working with our adapted Docker images? We’re currently writing a blog post about our collaboration with the customer who initiated our rework. Stay tuned!

Edit: Here's the follow-up blog post: Project “Piper” and Azure DevOps: Successful Collaboration with ‘delaware’

Are you new to CI/CD by SAP? Have a look at Continuous Integration and Delivery by SAP.

Are you interested in SAP’s CI/CD offerings? See SAP Solutions for Continuous Integration and Delivery.