Skip to content

transportRequestUploadCTS

This step uploads an UI5 application to the SAPUI5 ABAP repository.

Description

This step uploads an UI5 application from your project folder to the SAPUI5 ABAP repository of the SAPUI5 ABAP back-end infrastructure using the SAPUI5 Repository OData service. It processes the results of the ui5 build command of the SAPUI5 toolset.

Usage

We recommend to define values of step parameters via .pipeline/config.yml file.
In this case, calling the step is essentially reduced to defining the step name.
Calling the step can be done either in an orchestrator specific way (e.g. via a Jenkins library step) or on the command line.

library('piper-lib-os')

transportRequestUploadCTS script: this
piper transportRequestUploadCTS

Outputs

Output type Details
commonPipelineEnvironment
  • custom/transportRequestId

Prerequisites

  • You have installed the SAP component SAP_UI 7.53 or higher on your ABAP system.
  • You have enabled the OData Service to load data to the SAPUI5 ABAP repository.
  • You have the S_DEVELOP authorization to perform operations in your SAPUI5 ABAP repository.
  • You have created a transport request on the ABAP system, which is the target container of the SAPUI5 application for your upload.

Setting Up an Upload Client

The step transportRequestUploadCTS uses the Node.js-based SAP Fiori tools to upload your SAPUI5 application to the UI5 repository service of your ABAP back-end infrastructure. It performs the deployment command Fiori deploy on a Docker image.

By default, a plain node.js Docker image is pulled and equipped with the SAPUI5 toolset during runtime of the pipeline. Alternatively, you can provide your own, fully equipped Docker image. This speeds up the upload process, but requires you to maintain and provision the image on a Docker registry.

Creating a Fully Equipped Docker Image

To create an own Docker image with the SAP Fiori tools, proceed as follows:

  1. Create a node.js based Docker image with the SAP Fiori tools installed:

    FROM node
    USER root
    RUN npm install -global @ui5/cli @sap/ux-ui5-tooling @ui5/logger @ui5/fs
    USER node
    

    /bin/bash docker build -t my/fiori-node .

  2. Push your image to your private Docker Hub registry:

    /bin/bash docker push my/fiori-node

  3. Add the following content to your config.yml file:

    steps:
      transportRequestUploadCTS:
        dockerImage: 'my/fiori-node'
        deployToolDependencies: []
    

Building an SAPUI5 Application

Build your SAPUI5 application with the build command of the SAPUI5 toolset and use the step npmExecuteScripts to run the build command. Proceed as follows to do so:

  1. Configure the steps in the package.json file of your project as follows:

    {
       ...
       "scripts": {
          "start": "ui5 serve",
          "test": "npm run lint",
          "build": "ui5 build --clean-dest",
          ...
       },
       "dependencies": {},
       "devDependencies": {
          "@ui5/cli": "^2.11.2",
          ...
       }
    }
    
  2. Configure the execution step in the pipeline as follows:

    stage('Build') {
       npmExecuteScripts(script: this, runScripts: ['build'])
    }
    

Note: Do not use the mtaBuild step. The MTA Build Tool mta is dedicated to the SAP Business Technology Platform. It does neither create the expected dist folder nor the compliant content.

Uploading an SAPUI5 Application

The Fiori toolset uses the ODATA service to upload your UI5 application to the SAPUI5 ABAP repository. It controls access by Basic Authentication (user/password based authentication).

Note: Do not upload your application to SAP Business Technology Platform. The SAP BTP does not support Basic Authentication.

Note: Use an HTTPS endpoint to ensure the encryption of your credentials.

Specifying the Transport Request

The target of the upload is a transport request, identified by an identifier (ID).

The step transportRequestUploadCTS allows you to set the ID by parameter.

Alternatively, you can pass the ID through the parameter commonPipelineEnvironment. For example, by performing a step that generates the ID or obtains it differently. For more information, see transportRequestReqIDFromGit.

Adding a Parameter

A parameterized pipeline allows you to specify the ID with the launch of each build instead of entering it statically into the pipeline.

transportRequestUploadCTS(
    script: this,
    transportRequestId: ${TRANSPORT_REQUEST_ID},
    ...
)

The Jenkins pipeline input step allows you to specify the ID at runtime of the pipeline.

def ids = input( message: "Upload?",
    parameters: [
        string(name: 'TRANSPORT_REQUEST_ID',description: 'Transport Request ID')
    ]
)

transportRequestUploadCTS(
    script:this,
    transportRequestId: ids['TRANSPORT_REQUEST_ID'],
    ...
)

Common Pipeline Environment

Use the step transportRequestReqIDFromGit to obtain the transportRequestId value from your Git commit messages.

This step extracts the ID from the commit messages of your project repository and enters it into the commonPipelineEnvironment. In turn, the upload step transportRequestUploadCTS picks it up from there.

transportRequestReqIDFromGit( script: this )
transportRequestUploadCTS( script: this, ... )

General Purpose Pipeline Release Stage

The step can also be configured via General Purpose Pipeline in Release stage using the config.yml as follows:

stages:
  Release:
    transportRequestUploadCTS: true

This will initialize the step within the Release stage of the pipeline and will upload the desired application (SAPUI5/OPENUI5) to the SAPUI5 ABAP repository.

Parameters

Overview - Step

Name Mandatory Additional information
abapPackage yes
applicationName yes
password (yes) Secret pass via ENV or Jenkins credentials
script (yes) Jenkins only reference to Jenkins main pipeline script
transportRequestId yes
username (yes) Secret pass via ENV or Jenkins credentials
client no
deployConfigFile no
deployToolDependencies no
description no
endpoint no
npmInstallOpts no
osDeployUser no
verbose no activates debug output

Overview - Execution Environment

Orchestrator-specific only

These parameters are relevant for orchestrator usage and not considered when using the command line option.

Name Mandatory Additional information
containerCommand no Jenkins only
containerShell no Jenkins only
dockerEnvVars no
dockerImage no
dockerName no
dockerOptions no
dockerPullImage no
dockerVolumeBind no Jenkins only
dockerWorkspace no Jenkins only

Details

abapPackage

ABAP package name of the UI5 application

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_abapPackage (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

applicationName

Name of the UI5 application

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_applicationName (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

client

The ABAP client

back to overview

Scope Details
Aliases - changeManagement/client
- changeManagement/cts/client
Type string
Mandatory no
Default $PIPER_client (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

containerCommand

Jenkins-specific: Used for proper environment setup.

Kubernetes only: Allows to specify start command for container created with dockerImage parameter to overwrite Piper default (/usr/bin/tail -f /dev/null).

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

containerShell

Jenkins-specific: Used for proper environment setup.

Allows to specify the shell to be executed for container with containerName.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

deployConfigFile

Configuration file for the fiori deployment

back to overview

Scope Details
Aliases - changeManagement/deployConfigFile
- changeManagement/cts/deployConfigFile
Type string
Mandatory no
Default ui5-deploy.yaml
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

deployToolDependencies

List of additional dependencies to fiori related packages. By default a standard node docker image is used on which the dependencies are installed. Provide an empty list, in case your docker image already contains the required dependencies

back to overview

Scope Details
Aliases - changeManagement/deployToolDependencies
- changeManagement/cts/deployToolDependencies
Type []string
Mandatory no
Default - @ui5/cli
- @sap/ux-ui5-tooling
- @ui5/logger
- @ui5/fs
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

description

The description of the application. The description is only taken into account for a new upload. In case of an update the description will not be updated.

back to overview

Scope Details
Aliases applicationDescription
Type string
Mandatory no
Default Deployed with Piper based on SAP Fiori tools
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerEnvVars

Jenkins-specific: Used for proper environment setup.

Environment variables to set in the container, e.g. [http_proxy: "proxy:8080"].

back to overview

Scope Details
Aliases -
Type map[string]string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerImage

Jenkins-specific: Used for proper environment setup.

Name of the docker image that should be used. If empty, Docker is not used and the command is executed directly on the Jenkins system.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default node
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerName

Jenkins-specific: Used for proper environment setup.

Kubernetes only: Name of the container launching dockerImage. SideCar only: Name of the container in local network.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default fiori-client
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerOptions

Jenkins-specific: Used for proper environment setup.

Docker options to be set when starting the container.

back to overview

Scope Details
Aliases -
Type []string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerPullImage

Jenkins-specific: Used for proper environment setup.

Set this to 'false' to bypass a docker image pull. Useful during development process. Allows testing of images which are available in the local registry only.

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default true
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerVolumeBind

Jenkins-specific: Used for proper environment setup.

Volumes that should be mounted into the docker container.

back to overview

Scope Details
Aliases -
Type map[string]string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerWorkspace

Jenkins-specific: Used for proper environment setup.

Kubernetes only: Specifies a dedicated user home directory for the container which will be passed as value for environment variable HOME.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

endpoint

The ODATA service endpoint: https://:

back to overview

Scope Details
Aliases - changeManagement/endpoint
- changeManagement/cts/endpoint
Type string
Mandatory no
Default $PIPER_endpoint (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

npmInstallOpts

List of additional installation options for the npm install call. -g, --global is always assumed. Can be used for e.g. providing custom registries (--registry https://your.registry.com) or for providing the verbose flag (--verbose) for troubleshooting

back to overview

Scope Details
Aliases - changeManagement/npmInstallOpts
- changeManagement/cts/npmInstallOpts
Type []string
Mandatory no
Default $PIPER_npmInstallOpts (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

osDeployUser

Docker image user performing the deployment

back to overview

Scope Details
Aliases - changeManagement/osDeployUser
- changeManagement/cts/osDeployUser
Type string
Mandatory no
Default node
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

password

Service user password for uploading to the SAPUI5 ABAP repository

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_password (if set)
Secret yes
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☐ steps
  • ☐ stages
Resource references none

script

Jenkins-specific: Used for proper environment setup.

The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the this parameter, as in script: this. This allows the function to access the commonPipelineEnvironment for retrieving, e.g. configuration parameters.

back to overview

Scope Details
Aliases -
Type Jenkins Script
Mandatory yes
Default
Secret no
Configuration scope
  • ☐ parameter
  • ☐ general
  • ☐ steps
  • ☐ stages
Resource references none

transportRequestId

ID of the transport request to which the UI5 application is uploaded

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_transportRequestId (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references commonPipelineEnvironment:
  reference to: custom/transportRequestId

username

Service user for uploading to the SAPUI5 ABAP repository

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_username (if set)
Secret yes
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

verbose

verbose output

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default false
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

uploadCredentialsId

Jenkins-specific: Used for proper environment setup. See using credentials for details.

Jenkins 'Username with password' credentials ID containing user and password to authenticate against the ABAP system.

back to overview

Scope Details
Aliases changeManagement/credentialsId
Type string
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages

Example

# config.yaml
steps:
  transportRequestUploadCTS:
    changeManagement:
      credentialsId: 'CTS_CREDENTIALS_ID'
      endpoint: 'https://example.org'
      client: '001'
    abapPackage: 'PACK'
    applicationName: 'APP'
// pipeline script
   stage('Init') {
      transportRequestReqIDFromGit( script: this )
   }
   stage('Build') {
      npmExecuteScripts( script: this, runScripts: ['build'])
   }
   stage('Upload') {
      transportRequestUploadCTS( script: this)
   }