1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-16 11:09:33 +02:00
sap-jenkins-library/documentation/docs/scenarios/CAP_Scenario.md

3.3 KiB

Build and Deploy Applications with Jenkins and the SAP Cloud Application Programming Model

Set up a basic continuous delivery process for developing applications according to the SAP Cloud Application Programming Model. If you're building extensions of SAP solutions such as SAP S/4HANA, consider using SAP Cloud SDK and SAP Cloud SDK Pipeline which provides an out-of-the-box continuous delivery pipeline based on project "Piper".

Prerequisites

Context

The Application Programming Model for SAP Cloud Platform is an end-to-end best practice guide for developing applications on SAP Cloud Platform and provides a supportive set of APIs, languages, and libraries. For more information about the SAP Cloud Application Programming Model, see Working with the SAP Cloud Application Programming Model.

In this scenario, we want to show how to implement a basic continuous delivery process for developing applications according to this programming model with the help of project "Piper" on Jenkins. This basic scenario can be adapted and enriched according to your specific needs.

Example

Jenkinsfile

@Library('piper-library-os') _

node(){
  stage('Prepare')   {
      deleteDir()
      checkout scm
      setupCommonPipelineEnvironment script:this
  }

  stage('Build')   {
      mtaBuild script:this
  }

  stage('Deploy')   {
      cloudFoundryDeploy script:this, deployTool:'mtaDeployPlugin'
  }
}

Configuration (.pipeline/config.yml)

steps:
  mtaBuild:
    buildTarget: 'CF'
  cloudFoundryDeploy:
    cloudFoundry:
      credentialsId: 'CF'
      apiEndpoint: '<CF Endpoint>'
      org: '<CF Organization>'
      space: '<CF Space>'

Parameters

For the detailed description of the relevant parameters, see: