* Added CFDeleteServiceKeys * Added ServiceKey deletion tests * added cfServiceKeys flag explanation to documentation * removed trailing spaces from documentation * resolving conflicts * Changed deletion message an variable naming * Changed tests * Changed tests * Changed tests * Changed tests * Changed CloudFoundryDeleteServiceOptions to options * Changed CloudFoundryDeleteServiceOptions to options * Minor changes * Minor changes * Changed variable naming * Changed error handling * Changed error handling and logging * Changed documentation * Simplified code * Fixed CodeClimate issues * Changed from returning err to nil where no errur returned needed * Add cloudFoundryCreateServiceKey Go Step * Changed Groovy File * Changed aliases * Removed unneccessary parts * Minor changes * Minor changes * Adapted documentation * Adapted tests * Adapted Groovy File * Changed Groovy file * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Removed Groovy Tests for cfCreateServiceKey * Minor changes * Added ATC Check YAML * Added ATC Check generated files * Added test class * Added abapEnvironmentRunATCCheck * Minor changes * Minor changes * Changed groovy * Minor changes * Changed groovy * Changed groovy * Minor changes * Adapted Groovy imports * Adapted Groovy imports * Adapted Groovy imports * Adapted Groovy * Getting ATC results * Changed error message * changed groovy * removed trailing spaces * Added login check * Minor changes * Added step to whitelistScriptReference * Added ATC error message handling * Added groovy file * Added step to groovy tests * corrected metadata file * Debugging * Debugging * Added yaml config parameter for ATC run * Adapted file location of ATC run config to jenkins specific location * Implementing universal pipeline logic for finding yaml config regardless of pipeline * Changed error handling for reading config yaml file * Changed atcrunconfig alias * minor changes * Minor changes * Minor changes * Changed back to dynamic file reading * Minor changes * filepath changes * Removing CF Login * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Minor changes * Removed whitespaces * Added CF functions unit tests * Added invalid parameter handling * Removed package and SC flag * Minor changes * Changed tests * Changed tests * Changed tests * Minor changes * Changed tests * removed unnecessary logout * Added documentation * Changed docu * Changed docu * Changed docu * Changed docu * Changed docu * Changed docu * Changed docu * Changed docu * Changed docu * Changed docu * Removed trailing spaces * Added newline at end of file * code climate fixes * code climate fixes * code climate fixes * Minor changes * Minor changes * Minor changes * Changed tests * Test changes * Splitted Cloud Foundry functions into two classes * Removed two steps from whtielistScriptReference * removed atcrunConfig alias * issue fixes * Changed docu * Changed docu * Changed docu * Removed trailing spaced from docu * Changed docu * Go generator run * Issue fixes * Remove unnecessary imports Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com> * Update whitelistScript Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com> * Adding piperutils for writing xml file * Persisting ATC Results with piperutils * Set failonMissingReports to true * Refactoring for CodeClimate * Changed result file name * Changed credentials aliases * changing secret name * Removing trailing spaces * Added secret name and alias to docu * Add cloneGitRepo & checkoutBranch steps * Tests added * Docu added * docu changes * remark changes * Class name changed * minor changes * Test added for prepare system stage * Review changes * Tests * Step order tests * Step order tests * Step order tests * Step order tests * strategy parameter tests * configHelper import added * Default value for strategy added and remove pull config check * corrected stage default * Tests added * changes in TestConfig * Tests adapted for no prepare system stage * tests changed * changed tests * input added * changed tests * changed tests * changed tests * commonPipeline removed * add input register * remove step key * remove return * remove comment * correct method usage * CodeClimate Fixes * PR fixes * addonBuild rename * removed trailing spaces Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com> Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com> Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
7.8 KiB
ABAP Environment Pipeline
The goal of the ABAP Environment Pipeline is to enable Continuous Integration for the SAP Cloud Platform ABAP Environment, also known as Steampunk. The pipeline contains several stages and supports different scenarios. The general idea is that the user can choose a subset of these stages, which fits her/his use case, for example running nightly ATC checks or building an ABAP AddOn for Steampunk.
!!! note "Scenario: Building ABAP Add-ons for Steampunk" This scenario is intended for SAP Partners, who want to offer a Software as a Service (SaaS) solution on Steampunk. This is currently the only use case for building ABAP Add-ons and, more specifically, the stages "Initial Checks", "Build", "Integration Tests", "Confirm" and "Publish". This scenario will be documented in its own section soon.
The following stages and steps are part of the pipeline:
Stage | Steps |
---|---|
Init | - |
Initial Checks | abapAddonAssemblyKitCheckPV, abapAddonAssemblyKitCheckCVs |
Prepare System | cloudFoundryCreateService, cloudFoundryCreateServiceKey |
Clone Repositories | abapEnvironmentPullGitRepo |
ATC | abapEnvironmentRunATCCheck |
Build | cloudFoundryCreateServiceKey, abapAddonAssemblyKitReserveNextPackages, abapEnvironmentAssemblePackages, abapAddonAssemblyKitRegisterPackages, abapAddonAssemblyKitReleasePackages, abapAddonAssemblyKitCreateTargetVector, abapAddonAssemblyKitPublishTargetVector |
Integration Tests | cloudFoundryCreateService |
Confirm | - |
Publish | abapAddonAssemblyKitPublishTargetVector |
Post | cloudFoundryDeleteService |
Below you can find more details about the different stages. Here you can find more information about how to configure your pipeline.
Init
In this stage, the pipeline is initialized. Nothing to see here.
Initial Checks
This stage is executed, if the "Build" stage is configured. It contains checks to verify the validity of the provided AddOn Descriptor.
Prepare System
In this stage, the ABAP Environment system is created. This is done with the cloudFoundryCreateService step.
!!! caution "Limitation"
As some parts of the system configuration is done after the Cloud Foundry instance was created, the following workaround is currently necessary:
An authorized user has to manually confirm that the ABAP Environment system is ready. This is the case when the email has been received by the initially provided administrator (as configured in the file manifest.yml
- as described in configuration).
Redefining the "Prepare System" stage via an extension could circumvent the manual confirmation and replace it with an optimistic wait statement - this, however, may lead to a failing pipeline in case the system is not ready in time.
After the confirmation, the Communication Arrangement SAP_COM_0510 (SAP Cloud Platform ABAP Environment - Software Component Test Integration) is created using the step cloudFoundryCreateServiceKey. With the creation of the Communication Arrangement, a User and Password is created on the ABAP Environment system for the APIs that are used in the following stages.
Clone Repositories
As a default we assume that the ABAP Environment system is already configured and all Software Components are cloned and the latest change of the respective Software Components should be pulled with the abapEnvironmentPullGitRepo step.
In this stage, the Software Components / Git repositories are then pulled to the ABAP Environment system using the step abapEnvironmentPullGitRepo.
The step can receive a list of Software Components / repositories and pulls them successively.
If the Software Components have not been cloned on the ABAP Environment system yet or you want to e.g. checkout a different Branch you can make use of the strategy
stage parameter and perform other steps and step orders.
Please refer to the Configuration section for the abapEnvironment Pipeline or the respective documentations for the abapEnvironmentCheckoutBranch, abapEnvironmentCloneGitRepo and abapEnvironmentPullGitRepo steps.
Either way, if you chose a dedicated strategy or the default Pull variant you can optionally provide a dedicated configuration file, e.g. repositories.yml
, containing the repositories to be cloned and the branches to be switched to. This file can be used consistently for all strategies.
ATC
In this stage, ATC checks can be executed using abapEnvironmentRunATCCheck. The step can receive Software Components or packages (configured in YML file - as described in configuration). The results are returned in the checkstlye format. With the use of a pipeline extension, quality gates can be configured (see step documentation or the "Extensions" section in the configuration).
Build
This stage is responsible for building an ABAP AddOn for the SAP Cloud Platform ABAP Environment. The build process of the AddOn is done on a Steampunk system (using SAP_COM_0582) with the help of the ABAP Addon Assembly Kit as a Service (AAKaaS). After executing this stage successfully, the AddOn is ready to be tested.
Integration Tests
This stage is intended to be used for testing the AddOn built in the "Build" stage. Nevertheless, it can be configured seperately. In this stage, another ABAP Environment system is created including the AddOn (if configured correctly).
Confirm
This stage is executed if the stage "Publish" is configured. In this stage a manual confirmation is prompted to confirm the publishing of the AddOn.
Publish
In this stage the AddOn built with this pipeline is published. After that, it is ready to be delivered to productive systems.
Post
At the end of every pipeline (successful or unsuccessful), the system is deprovisioned using the step cloudFoundryDeleteService.