1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-30 05:59:39 +02:00
Laura Veinberga e83a380c09
SAP CP to SAP BTP Rebranding (#2703)
* Update configuration.md

* Update build.md

* Update cloneRepositories.md

* Update integrationTest.md

* Update post.md

* Update prepareSystem.md

* Update publish.md

* Update configuration.md

* Update configuration.md

* Update introduction.md

* Update build.md

* Update CAP_Scenario.md

* Update CAP_Scenario.md

* Update abapEnvironmentAddons.md

* Update abapEnvironmentAddons.md

* Update abapEnvironmentTest.md

* Update changeManagement.md

* Update Readme.md

* Update Readme.md

* Update introduction.md

* Update abapEnvironmentAssembleConfirm.md

* Update abapEnvironmentAssemblePackages.md

* Update abapEnvironmentCheckoutBranch.md

* Update abapEnvironmentCloneGitRepo.md

* Update abapEnvironmentCreateSystem.md

* Update abapEnvironmentPullGitRepo.md

* Update abapEnvironmentRunATCCheck.md

* Update cloudFoundryCreateService.md

* Update cloudFoundryCreateSpace.md

* Update cloudFoundryDeleteSpace.md

* Update mtaBuild.md

* Update neoDeploy.md

* Update protecodeExecuteScan.md

* Update uiVeri5ExecuteTests.md

* Update guidedtour.md

* Update index.md

* Update configuration.md

* Update guidedtour.md

* Update configuration.md

* Update build.md

* Update CAP_Scenario.md

* Update TMS_Extension.md

* Update TMS_Extension.md

* Update abapEnvironmentAddons.md

* Update abapEnvironmentTest.md

* Update Readme.md

* Update Readme.md

* Update cloudFoundryDeploy.md

* Update influxWriteData.md

* Update neoDeploy.md

* Update CAP_Scenario.md

* Update TMS_Extension.md

* Update Readme.md

* Update Readme.md

* Update guidedtour.md

* Update guidedtour.md

* Update guidedtour.md

* Update configuration.md

Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2021-03-19 10:51:24 +01:00
..
2019-10-23 11:03:17 +02:00
2021-03-19 10:51:24 +01:00

Build and Deploy SAP Fiori Applications on SAP HANA Extended Application Services, Advanced Model

Build an application based on SAPUI5 or SAP Fiori with Jenkins and deploy the build result to SAP HANA extended application services, advanced model.

Prerequisites

  • Docker environment
  • All artifacts referenced during the build are available either on Service Market Place or via public repositories.
  • You have set up project “Piper”. See guided tour.
  • Docker image for xs deployment is locally available. Due to legal reasons, there is no pre-build Docker image. How to create the Docker image is explained here.

Project Prerequisites

This scenario requires additional files in your project and in the execution environment on your Jenkins instance. For details see: XSA developer quick start guide.

Context

This scenario combines various different steps to create a complete pipeline.

In this scenario, we want to show how to build a multitarget application (MTA) and deploy the build result into an on-prem SAP HANA XS advances system. This document comprises the mtaBuild and the xsDeploy steps.

This pipeline in Jenkins Blue Ocean

Screenshot: Build and Deploy Process in Jenkins

Example

Jenkinsfile

Following the convention for pipeline definitions, use a Jenkinsfile, which resides in the root directory of your development sources.

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

pipeline {

    agent any

    stages {
        stage("prepare") {
            steps {
                deleteDir()
                checkout scm
                setupCommonPipelineEnvironment script: this
            }
        }
        stage('build') {
            steps {
                mtaBuild script: this
            }
        }
        stage('deploy') {
            steps {
                xsDeploy script: this
            }
        }
    }
}

Configuration (.pipeline/config.yml)

This is a basic configuration example, which is also located in the sources of the project.

steps:
  mtaBuild:
    buildTarget: 'XSA'
  xsDeploy:
    apiUrl: '<API_URL>' # e.g. 'https://example.org:30030'
    # credentialsId: 'XS' omitted, 'XS' is the default
    docker:
      dockerImage: '<ID_OF_THE_DOCKER_IMAGE' # for legal reasons no docker image is provided.
      # dockerPullImage: true # default: 'false'. Needs to be set to 'true' in case the image is served from a docker registry
    loginOpts: '' # during setup for non-productive builds we might set here. '--skip-ssl-validation'
    org: '<ORG_NAME>'
    space: '<SPACE>'

Configuration for the MTA Build

Parameter Description
buildTarget The target platform to which the mtar can be deployed. In this case, the target platform is XSA.

Configuration for the Deployment to XSA

Parameter Description
credentialsId The Jenkins credentials that contain user and password required for the deployment on SAP BTP.
mode  DeployMode. See stepDocu for more details.
org The org. See stepDocu for more details.
space The space. See stepDocu for more details.

Parameters

For the detailed description of the relevant parameters, see: