mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-25 21:39:13 +02:00
* new step abapEnvironmentBuild * Update piper.go * Update abapEnvironmentBuild.go * update yaml file * Logging for debugging * Update abaputils.go * Update connector.go * assigning connector * delete debugging logging * Update abapEnvironmentBuild.go * certificate to yaml * Update abapEnvironmentBuild.go * add scope * Update abapEnvironmentBuild.go * Update abapEnvironmentBuild.yaml * change certificate name in yaml * test my new gitscript * logging for debugging * debugging... * adding options to client. * skip verification * debugging * debugging... * switch of transportskipverification * changing connector return * deleting additional set options * fixed timeout error * adding certificate * testing without certificate set * testing with certificate set * download, publish and value logic * write values to cpe * logging * adding condition on string length * change publishmethod and some logging * change download method -> using references * evaluation of parameter for download * add case for empty string * adding unittests * Update mockClient.go * make abapEnvironmentBuildUtilsBundle powerful * refactor abapEnvironmentBuild into pieces * check error message * check error message 2 * check error message 3 * check error message 4 * remove check error message * cleanup * adding unittests * unittests and docu * docu * docu * Update abapEnvironmentBuild.md * removing trailing spaces and adding empty lines in docu * Update abapEnvironmentBuild.md * fixing unittest and PR recommen * Update abapEnvironmentPipelineStageBuild.groovy * Update abapEnvironmentPipelineStageBuild.groovy * Update abapEnvironmentPipelineStageBuild.groovy * Update abapEnvironmentPipelineStageBuild.groovy * changes derived from pull request Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
4.1 KiB
4.1 KiB
${docGenStepName}
${docGenDescription}
Prerequisites SAP BTP, ABAP environment
- 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.
Prerequisites On Premise
- You need to specify the host and credentials to your system
- A certificate for the system needs to be stored in .pipeline/trustStore and the name of the certificate needs to be handed over via the configuration
${docGenParameters}
${docGenConfiguration}
${docJenkinsPluginDependencies}
Examples
Configuration in the config.yml
If you want to use this step several time in one pipeline with different phases, the steps have to be put in different stages as it is not allowed to run the same step repeatedly in one stage.
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:
stage('MyPhase') {
steps {
abapEnvironmentBuild script: this
}
}
If you want to provide the host and credentials of the Communication Arrangement directly or you want to run in on premise, the configuration could look as follows:
stages:
MyPhase:
abapCredentialsId: 'abapCredentialsId',
host: 'https://myABAPendpoint.com',
Or by authenticating against Cloud Foundry and reading the Service Key details from there:
stages:
MyPhase:
abapCredentialsId: 'cfCredentialsId',
cfApiEndpoint : 'https://test.server.com',
cfOrg : 'cfOrg',
cfSpace: 'cfSpace',
cfServiceInstance: 'myServiceInstance',
cfServiceKeyName: 'myServiceKey',
One possible complete config example. Please note that the values are handed over as a string, which has inside a json structure:
stages:
MyPhase:
abapCredentialsId: 'abapCredentialsId'
host: 'https://myABAPendpoint.com'
certificateNames: ['myCert.cer']
phase: 'MyPhase'
values: '[{"value_id":"ID1","value":"Value1"},{"value_id":"ID2","value":"Value2"}]'
downloadResultFilenames: ['File1','File2']
publishResultFilenames: ['File2']
subDirectoryForDownload: 'MyDir'
filenamePrefixForDownload: 'MyPrefix'
treatWarningsAsError: true
maxRuntimeInMinutes: 360
pollingIntervallInSeconds: 15