* Adapt docu * Improve docu * Small adaptions * Small fix * Fix typos
4.7 KiB
Continuous Testing on SAP Cloud Platform ABAP Environment
Introduction
This scenario describes how to test ABAP development for the SAP Cloud Platform ABAP Environment (also known as Steampunk). In Steampunk, the development is done within “software components” (also called: “repositories”) and "transported" via git-based approaches. The ABAP Environment Pipeline is a predefined pipeline, which can be used to import ABAP development into a quality system and execute tests.
Pipeline
For this scenario three stages of the ABAP Environment Pipeline are relevant: "Prepare System", "Clone Repositories" and "ATC".
Prepare System
The pipeline starts with the stage "Prepare System". This stage, however, is optional. If this stage is active, a new Steampunk system is created for each pipeline execution. This has the advantage, that each test runs on a fresh system without a history. On the other hand, the duration of each pipeline execution will increase as the system provisioning takes a significant amount of time. If this stage is not active, you have to provide a prepared Steampunk (quality) system for the other stages. Then, each pipeline execution runs on the same system. Of course, the system has a history, but the pipeline duration will be shorter. Please also consider: the total costs may increase for a static system in contrast to a system, which is only active during the pipeline.
Clone Repositories
This stage is responsible for cloning (or pulling) the defined software components (repositories) to the system.
ATC
This stage runs ATC checks on the SAP Cloud Platform ABAP Environment system. The results are returned in the "CheckStyle" format. With the help of a stage extension, a plugin can be used to visualize the check results.
Prerequisites
There are several parts that are required to run the pipeline.
Jenkins Server
The pipeline for testing software components has been created specifically for Jenkins. Therefore, a Jenkins Server is required. The piper project provides a Jenkins image, which already includes the necessary configurations. Of course, it is also possible to configure an existing server.
Git Repository
The pipeline configuration is done in a git repository (for example on GitHub). This repository needs to be accessed by the Jenkins Server. If the repository is password protected, the user and password (or access token) should be stored in the Jenkins Credentials Store (Manage Jenkins → Manage Credentials).
Cloud Foundry Access
ABAP Environment systems are created in the SAP Cloud Platform Cockpit. For this pipeline, the creation and deletion of the systems are automated via the Cloud Foundry Command Line Interface: cf CLI. For this to work, two things need to be configured:
- Cloud Foundry needs to be enabled on subaccount level. This can be done on the Subaccount Overview page. The subaccount is then mapped to a “Cloud Foundry Organization”, for which you must provide a suitable name during the creation. Have a look at the documentation for more details.
- A (technical) user is required to access the SAP Cloud Platform via the cf CLI. The user needs to be a member of the global account and has to have the Space Developer role. The user and password need to be stored in the Jenkins Credentials Store.
During the pipeline configuration, you will specify the Service Plan, which will be used for the creation of an ABAP Environment system. Please make sure, that there are enough entitlements for this Service Plan in the Subaccount.
Configuration
Please refer to the configuration page or have a look at these examples: Running ATC checks on a transient system or running ATC checks on a static system.