1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/documentation/docs/steps/transportRequestUploadRFC.md
Roland Stengel 43408d0eea
RFC Upload Documentation (#2922)
RFC Upload Doc
- add RFC upload document
2021-07-08 11:07:08 +02:00

3.2 KiB

${docGenStepName}

${docGenDescription}

Prerequisites

  • You have enabled RFC on the ABAP system.
  • You have a user account on the ABAP system where you have assigned the required roles for uploading via RFC.
  • You have created a transport request on the ABAP system, which is the target container of the upload.

RFC Client

The RFC Client connects to your ABAP system using the SAP NetWeaver RFC SDK.

For more information, see classical SAP connectivity technology RFC.

To install an RFC library based Connector Client, proceed as follows:

  1. Create a Docker image as described in the Git repository devops-docker-images/node-rfc.
  2. Push your image to your private Docker Hub registry.
  3. Add the following to your config.yml file:
steps:
  transportRequestUploadRFC:
    dockerImage: 'my/rfc-client'

Specifying the Transport Request

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

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

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

Adding a Parameter

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

transportRequestUploadRFC(
    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')
    ]
)

transportRequestUploadRFC(
    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 transportRequestUploadRFC picks it up from there.

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

${docGenParameters}

${docGenConfiguration}

${docJenkinsPluginDependencies}

Example

# config.yaml
steps:
  transportRequestUploadRFC:
    changeManagement:
      credentialsId: 'RFC_CREDENTIALS_ID'
      endpoint: 'https://example.org/cm/rfc/endpoint'
      instance: '00'
      client: '001'
    abapPackage: 'PACK'
    applicationDescription: 'Lorem ipsum'
    applicationName: 'APP'
    dockerImage: 'my/rfc-client'
// pipeline script
transportRequestReqIDFromGit( script: this )
transportRequestUploadRFC( script: this, applicationUrl: 'https://example.org/appl/url/archive.zip')