abapEnvironmentAssemblePackages¶
Assembly of installation, support package or patch in SAP BTP ABAP Environment system
Description¶
This step runs the assembly of a list of provided installations, support packages or patches in SAP Cloud Platform ABAP Environment system and saves the corresponding SAR archive to the filesystem.
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')
abapEnvironmentAssemblePackages script: this
piper abapEnvironmentAssemblePackages
Outputs¶
Output type | Details |
---|---|
commonPipelineEnvironment |
|
Artifacts¶
- package logs ({packagename}.zip) This archive contains all relevant transport logs per assembled package which might be needed for detailed analysis in case of support requests or for audit purpose. For productive builds it might be advisable to store this file as well as the overall pipeline run logs in a revision proof manner. For every assembled package an respective zip archive with its related logs are created and archived as artifact.
Prerequisites¶
- A SAP BTP, ABAP environment system is available.
- This can be created manually on Cloud Foundry.
- In a pipeline, you can do this, for example, with the step cloudFoundryCreateService.
- Communication Scenario “SAP BTP, ABAP Environment - Software Assembly Integration (SAP_COM_0582)“ is setup for this system.
- E.g. a Communication User, a Communication System and a Communication Arrangement are configured.
- This can be done manually through the respective applications on the SAP BTP, ABAP environment system,
- or through creating a service key for the system on cloud foundry with the parameters {“scenario_id”: “SAP_COM_0582", “type”: “basic”}.
- In a pipeline, you can do this, for example, with the step cloudFoundryCreateServiceKey.
- You have following options to provide the ABAP endpoint configuration:
- The host and credentials the SAP BTP, ABAP environment system itself. The credentials must be configured for the Communication Scenario SAP_COM_0582.
- The Cloud Foundry parameters (API endpoint, organization, space), credentials, the service instance for the ABAP service and the service key for the Communication Scenario SAP_COM_0582.
- Only provide one of those options with the respective credentials. If all values are provided, the direct communication (via host) has priority.
- The step needs information about the packages which should be assembled present in the CommonPipelineEnvironment.
- For each repository/component version it needs the name of the repository, the version, splevel, patchlevel, namespace, packagename, package type, the status of the package, and optional the predecessor commit id.
- To upload this information to the CommonPipelineEnvironment run prior to this step the steps:
- If one of the package is already in status released, the assembly for this package will not be executed.
- The Software Components for which packages are to be assembled need to be present in the system.
- This can be done manually through the respective applications on the SAP BTP, ABAP environment system.
- In a pipeline, you can do this, for example, with the step abapEnvironmentPullGitRepo.
- The packages to be assembled need to be reserved in AAKaaS and the corresponding information needs to be present in CommonPipelineEnvironment. To do so run step abapAddonAssemblyKitReserveNextPackages prior this step.
Parameters¶
Overview - Step¶
Name | Mandatory | Additional information |
---|---|---|
addonDescriptor | yes | |
password | (yes) | pass via ENV or Jenkins credentials |
script | (yes) | reference to Jenkins main pipeline script |
username | (yes) | pass via ENV or Jenkins credentials |
certificateNames | no | |
cfApiEndpoint | no | |
cfOrg | no | |
cfServiceInstance | no | |
cfServiceKeyName | no | |
cfSpace | no | |
host | no | |
maxRuntimeInMinutes | no | |
pollIntervalsInMilliseconds | 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 | |
containerShell | no | |
dockerEnvVars | no | |
dockerImage | no | |
dockerName | no | |
dockerOptions | no | |
dockerPullImage | no | |
dockerVolumeBind | no | |
dockerWorkspace | no |
Details¶
addonDescriptor¶
Structure in the commonPipelineEnvironment containing information about the Product Version and corresponding Software Component Versions
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_addonDescriptor (if set) |
Secret | no |
Configuration scope |
|
Resource references | commonPipelineEnvironment: reference to: abap/addonDescriptor |
certificateNames¶
file names of trusted (self-signed) server certificates - need to be stored in .pipeline/trustStore
Scope | Details |
---|---|
Aliases | - |
Type | []string |
Mandatory | no |
Default | $PIPER_certificateNames (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
cfApiEndpoint¶
Cloud Foundry API endpoint
Scope | Details |
---|---|
Aliases | cloudFoundry/apiEndpoint |
Type | string |
Mandatory | no |
Default | $PIPER_cfApiEndpoint (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
cfOrg¶
Cloud Foundry target organization
Scope | Details |
---|---|
Aliases | cloudFoundry/org |
Type | string |
Mandatory | no |
Default | $PIPER_cfOrg (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
cfServiceInstance¶
Cloud Foundry Service Instance
Scope | Details |
---|---|
Aliases | cloudFoundry/serviceInstance |
Type | string |
Mandatory | no |
Default | $PIPER_cfServiceInstance (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
cfServiceKeyName¶
Cloud Foundry Service Key
Scope | Details |
---|---|
Aliases | - cloudFoundry/serviceKey - cloudFoundry/serviceKeyName - cfServiceKey |
Type | string |
Mandatory | no |
Default | $PIPER_cfServiceKeyName (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
cfSpace¶
Cloud Foundry target space
Scope | Details |
---|---|
Aliases | cloudFoundry/space |
Type | string |
Mandatory | no |
Default | $PIPER_cfSpace (if set) |
Secret | no |
Configuration scope |
|
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).
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
containerShell¶
Jenkins-specific: Used for proper environment setup.
Allows to specify the shell to be executed for container with containerName.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerEnvVars¶
Jenkins-specific: Used for proper environment setup.
Environment variables to set in the container, e.g. [http_proxy: "proxy:8080"].
Scope | Details |
---|---|
Aliases | - |
Type | map[string]string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
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.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | ppiper/cf-cli:v12 |
Secret | no |
Configuration scope |
|
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.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | cf |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerOptions¶
Jenkins-specific: Used for proper environment setup.
Docker options to be set when starting the container.
Scope | Details |
---|---|
Aliases | - |
Type | []string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
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.
Scope | Details |
---|---|
Aliases | - |
Type | bool |
Mandatory | no |
Default | true |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
dockerVolumeBind¶
Jenkins-specific: Used for proper environment setup.
Volumes that should be mounted into the docker container.
Scope | Details |
---|---|
Aliases | - |
Type | map[string]string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
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
.
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
host¶
Specifies the host address of the SAP BTP ABAP Environment system
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | no |
Default | $PIPER_host (if set) |
Secret | no |
Configuration scope |
|
Resource references | none |
maxRuntimeInMinutes¶
maximal runtime of the step in minutes
Scope | Details |
---|---|
Aliases | - |
Type | int |
Mandatory | no |
Default | 360 |
Secret | no |
Configuration scope |
|
Resource references | none |
password¶
Password for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0582
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_password (if set) |
Secret | yes |
Configuration scope |
|
Resource references | none |
pollIntervalsInMilliseconds¶
wait time in milliseconds till next status request in the backend system
Scope | Details |
---|---|
Aliases | - |
Type | int |
Mandatory | no |
Default | 60000 |
Secret | no |
Configuration scope |
|
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.
Scope | Details |
---|---|
Aliases | - |
Type | Jenkins Script |
Mandatory | yes |
Default | |
Secret | no |
Configuration scope |
|
Resource references | none |
username¶
User for either the Cloud Foundry API or the Communication Arrangement for SAP_COM_0582
Scope | Details |
---|---|
Aliases | - |
Type | string |
Mandatory | yes |
Default | $PIPER_username (if set) |
Secret | yes |
Configuration scope |
|
Resource references | none |
verbose¶
verbose output
Scope | Details |
---|---|
Aliases | - |
Type | bool |
Mandatory | no |
Default | false |
Possible values | - true - false |
Secret | no |
Configuration scope |
|
Resource references | none |
abapCredentialsId¶
Jenkins-specific: Used for proper environment setup. See using credentials for details.
Jenkins credentials ID containing user and password to authenticate to the Cloud Platform ABAP Environment system or the Cloud Foundry API
Scope | Details |
---|---|
Aliases | - cfCredentialsId - credentialsId |
Type | string |
Configuration scope |
|
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 is reduced to one line:
abapEnvironmentAssemblePackages script: this
If you want to provide the host and credentials of the Communication Arrangement directly, the configuration could look as follows:
steps:
abapEnvironmentAssemblePackages:
abapCredentialsId: 'abapCredentialsId',
host: 'https://myABAPendpoint.com',
Or by authenticating against Cloud Foundry and reading the Service Key details from there:
steps:
abapEnvironmentAssemblePackages:
abapCredentialsId: 'cfCredentialsId',
cfApiEndpoint : 'https://test.server.com',
cfOrg : 'cfOrg',
cfSpace: 'cfSpace',
cfServiceInstance: 'myServiceInstance',
cfServiceKeyName: 'myServiceKey',
Input via the CommonPipelineEnvironment¶
{"addonProduct":"",
"addonVersion":"",
"addonVersionAAK":"",
"addonUniqueID":"",
"customerID":"",
"AddonSpsLevel":"",
"AddonPatchLevel":"",
"TargetVectorID":"",
"repositories":[
{
"name":"/DMO/REPO_A",
"tag":"",
"branch":"",
"version":"",
"versionAAK":"0001",
"PackageName":"SAPK001001REPOA",
"PackageType":"CPK",
"SpLevel":"0000",
"PatchLevel":"0001",
"PredecessorCommitID":"cbb834e9e03cde177d2f109a6676901972983fbc",
"Status":"P",
"Namespace":"/DMO/",
"SarXMLFilePath":""
},
{
"name":"/DMO/REPO_B",
"tag":"",
"branch":"",
"version":"",
"versionAAK":"0002",
"PackageName":"SAPK002001REPOB",
"PackageType":"CPK",
"SpLevel":"0001",
"PatchLevel":"0001",
"PredecessorCommitID":"2f7d43923c041a07a76c8adc859c737ad772ef26",
"Status":"P",
"Namespace":"/DMO/",
"SarXMLFilePath":""
}
]}