1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

Adapt documentation of ABAP Environment Pipeline (#1928)

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
This commit is contained in:
Daniel Mieg 2020-08-18 10:38:14 +02:00 committed by GitHub
parent ab64219ac4
commit dc9e04f7ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 7 deletions

View File

@ -1,13 +1,16 @@
# Configuration
In this section, you can learn how to create a configuration in a (GitHub) repository to run an ABAP Environment Pipeline.
In this section, you can learn how to create a configuration in a (GitHub) repository to run an ABAP Environment Pipeline. This sepcific example will create a pipeline, which executes ATC checks after creating a new ABAP Environment system. In the end, the system will be deprovisioned.
You can have a look at different pipeline configurations in our [SAP-samples repository](https://github.com/SAP-samples/abap-platform-ci-cd-samples).
## 1. Prerequisites
* Configure your Jenkins Server according to the [documentation](https://sap.github.io/jenkins-library/guidedtour/).
* Create a git repository on a host reachable by the Jenkinsserver (e.g. GitHub.com). The pipeline will be configured in this repository.
* A Cloud Foundry Organization & Space with the necessary entitlements are available
* A Cloud Foundry User & Password with the required authorizations in the Organization and Space are available. User and Password were saved in the Jenkins Credentials Store
* Create a git repository on a host reachable by the Jenkins server (e.g. GitHub.com). The pipeline will be configured in this repository. Create a GitHub User with read access.
* The entitlements for the ABAP Environment system are available in the SAP Cloud Platform global account and assigned to the subaccount.
* A Cloud Foundry Organization & Space with the allocated entitlements are available.
* A Cloud Foundry User & Password with the required authorization ("Space Developer") in the Organization and Space are available. User and Password were saved in the Jenkins Credentials Store.
## 2. Jenkinsfile
@ -75,7 +78,7 @@ Create a file `.pipeline/config.yml` where you store the configuration for the p
```yml
general:
cfApiEndpoint: 'https://api.cf.sap.hana.ondemand.com'
cfApiEndpoint: 'https://api.cf.eu10.hana.ondemand.com'
cfOrg: 'your-cf-org'
cfSpace: 'yourSpace'
cfCredentialsId: 'cfAuthentification'
@ -96,6 +99,10 @@ steps:
If one stage of the pipeline is not configured in this yml file, the stage will not be executed during the pipeline run. If the stage `Prepare System` is configured, the system will be deprovisioned in the cleanup routine - although it is necessary to configure the step `cloudFoundryDeleteService` as above.
Please make sure the parameters align with the values defined in the other configuration files, e.g. the service name in the `manifest.yml` needs to be the same as the value in `general.cfServiceInstance`.
The values for `cfApiEndpoint`,`cfOrg` and `cfSpace` can be found in the respective overview pages in the SAP Cloud Platform Cockpit. The Cloud Foundry credentials, saved in the Jenkins credentials store with the ID `cfCredentialsId`, must refer to a user with the required authorizations ("Space Developer") for the Cloud Foundry Organization and Space.
## 7. Create a Jenkins Pipeline
On your Jenkinsserver click on `New Item` to create a new pipeline. Provide a name and select the type `Pipeline`.

View File

@ -21,9 +21,12 @@ In this stage, the pipeline is initialized. Nothing to see here.
## Prepare System
In this stage, the ABAP Environment system is created. This is done with the cloudFoundryCreateService step. As some parts of the system configuration is done after the Cloud Foundry instance was created, the following workaround is currently necessary:
In this stage, the ABAP Environment system is created. This is done with the cloudFoundryCreateService step.
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](configuration.md)).
!!! 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](configuration.md)).
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.