Remove ", buildTarget:'CF'" from Jenkinsfile example
3.0 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.
Prerequisites
- You have an account on SAP Cloud Platform in the Cloud Foundry environment. See Accounts.
- You have downloaded and installed the Cloud Foundry command line interface (CLI). See Download and Install the Cloud Foundry Command Line Interface.
- You have installed the multi-target application plug-in for the Cloud Foundry command line interface. See Install the Multi-Target Application Plug-in in the Cloud Foundry Environment.
- You have installed the Java Runtime Environment 8.
- You have installed Jenkins 2.60.3 or higher.
- You have set up Project “Piper”. See README.
- You have installed the Multi-Target Application (MTA) Archive Builder 1.0.6 or newer. See SAP Development Tools.
- You have installed Node.js including node and npm. See Node.js.
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: