Skip to content

abapAddonAssemblyKitPublishTargetVector

This step triggers the publication of the Target Vector according to the specified scope.

Description

This step reads the Target Vector ID from the addonDescriptor in the commonPipelineEnvironment and triggers the publication of the Target Vector. With targetVectorScope "T" the Target Vector will be published to the test environment and with targetVectorScope "P" it will be published to the productive environment.

Usage

We recommend to define values of step parameters via config.yml file. In this case, calling the step is reduced to one simple line.
Calling the step can be done either via the Jenkins library step or on the command line.

Jenkins Pipeline

library('piper-lib-os')

abapAddonAssemblyKitPublishTargetVector script: this

Command Line

piper abapAddonAssemblyKitPublishTargetVector

Prerequisites

  • The credentials to access the AAKaaS (e.g. S-User) must be stored in the Jenkins Credential Store
  • This step needs an existing Target Vector as well as the scope where it should be published.
  • The Target Vector ID is taken from the addonDescriptor in the commonPipelineEnvironment.
  • If you run prior to this step the step abapAddonAssemblyKitCreateTargetVector, the Target Vector will be created and its ID will be written to the commonPipelineEnvironment

Parameters

Overview

Name Mandatory Additional information
abapAddonAssemblyKitEndpoint yes
addonDescriptor yes
password yes Secret pass via ENV or Jenkins credentials
script yes Jenkins only reference to Jenkins main pipeline script
username yes Secret pass via ENV or Jenkins credentials
targetVectorScope no
verbose no activates debug output

Details

abapAddonAssemblyKitEndpoint

Base URL to the Addon Assembly Kit as a Service (AAKaaS) system

back to overview

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

addonDescriptor

Structure in the commonPipelineEnvironment containing information about the Product Version and corresponding Software Component Versions

back to overview

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

password

Password for the Addon Assembly Kit as a Service (AAKaaS) system

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

targetVectorScope

Determines whether the Target Vector is published to the productive ('P') or test ('T') environment

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_targetVectorScope (if set)
Possible values - T
- P
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references none

username

User for the Addon Assembly Kit as a Service (AAKaaS) system

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

abapAddonAssemblyKitCredentialsId

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

Credential stored in Jenkins for the Addon Assembly Kit as a Service (AAKaaS) system

back to overview

Scope Details
Aliases -
Type string
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages

Examples

Configuration in the config.yml

The recommended way to configure your pipeline is via the config.yml file. In this case, calling the step in the Jenkinsfile looks:

abapAddonAssemblyKitPublishTargetVector(
                    targetVectorScope: 'T',
                    script: this,
                    )

The config.yml should look like this:

steps:
  abapAddonAssemblyKitPublishTargetVector:
    abapAddonAssemblyKitCredentialsId: 'abapAddonAssemblyKitCredentialsId',
    abapAddonAssemblyKitEndpoint: 'https://myabapAddonAssemblyKitEndpoint.com',

Input via the CommonPipelineEnvironment

Mandatory fields:

{"addonProduct":"",
"addonVersion":"",
"addonVersionAAK":"",
"addonUniqueID":"",
"customerID":"",
"AddonSpsLevel":"",
"AddonPatchLevel":"",
"TargetVectorID":"W7Q00207512600000188",
"repositories":[
  {
    "name":"",
    "tag":"",
    "branch":"",
    "version":"",
    "versionAAK":"",
    "PackageName":"",
    "PackageType":"",
    "SpLevel":"",
    "PatchLevel":"",
    "PredecessorCommitID":"",
    "Status":"",
    "Namespace":"",
    "SarXMLFilePath":""
  },
  {
    "name":"",
    "tag":"",
    "branch":"",
    "version":"",
    "versionAAK":"",
    "PackageName":"",
    "PackageType":"",
    "SpLevel":"",
    "PatchLevel":"",
    "PredecessorCommitID":"",
    "Status":"",
    "Namespace":"",
    "SarXMLFilePath":""
  }
]}