mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-05 15:15:44 +02:00
Do not merge before go live of steampunk 2205! Insert generic build step into abap environment pipeline (#3507)
* enhance build step * Update abapEnvironmentBuild.go * build with addonDescriptor * use addondescriptor * Use Addondescriptor * add error * improve logging * rename intervall to interval * update yaml * Update abapEnvironmentBuild.go * Update abapEnvironmentBuild.yaml * insert generation phase * we do not know what we have done * Add createServiceKey to test Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com> Co-authored-by: Daniel Mieg <daniel.mieg@sap.com>
This commit is contained in:
parent
d883a729b0
commit
d30395931b
@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"time"
|
||||
|
||||
abapbuild "github.com/SAP/jenkins-library/pkg/abap/build"
|
||||
|
@ -42,6 +42,8 @@ stages:
|
||||
abapSystemSizeOfRuntime: 1
|
||||
confirmDeletion: 'true'
|
||||
includeAddon: 'true'
|
||||
cfServiceKeyName: 'sap_com_0582'
|
||||
cfServiceKeyConfig: '{"scenario_id":"SAP_COM_0582","type":"basic"}'
|
||||
|
||||
Confirm:
|
||||
ordinal: 80
|
||||
|
@ -41,6 +41,8 @@ class abapEnvironmentPipelineStageIntegrationTestsTest extends BasePiperTest {
|
||||
})
|
||||
helper.registerAllowedMethod('abapEnvironmentCreateSystem', [Map.class], {m -> stepsCalled.add('abapEnvironmentCreateSystem')})
|
||||
helper.registerAllowedMethod('cloudFoundryDeleteService', [Map.class], {m -> stepsCalled.add('cloudFoundryDeleteService')})
|
||||
helper.registerAllowedMethod('abapEnvironmentBuild', [Map.class], {m -> stepsCalled.add('abapEnvironmentBuild')})
|
||||
helper.registerAllowedMethod('cloudFoundryCreateServiceKey', [Map.class], {m -> stepsCalled.add('cloudFoundryCreateServiceKey')})
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -54,6 +56,8 @@ class abapEnvironmentPipelineStageIntegrationTestsTest extends BasePiperTest {
|
||||
assertThat(stepsCalled, hasItems('input'))
|
||||
assertThat(stepsCalled, hasItems('abapEnvironmentCreateSystem'))
|
||||
assertThat(stepsCalled, hasItems('cloudFoundryDeleteService'))
|
||||
assertThat(stepsCalled, hasItems('abapEnvironmentBuild'))
|
||||
assertThat(stepsCalled, hasItems('cloudFoundryCreateServiceKey'))
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -68,6 +72,8 @@ class abapEnvironmentPipelineStageIntegrationTestsTest extends BasePiperTest {
|
||||
assertThat(stepsCalled, not(hasItem('input')))
|
||||
assertThat(stepsCalled, hasItems('abapEnvironmentCreateSystem'))
|
||||
assertThat(stepsCalled, hasItems('cloudFoundryDeleteService'))
|
||||
assertThat(stepsCalled, hasItems('abapEnvironmentBuild'))
|
||||
assertThat(stepsCalled, hasItems('cloudFoundryCreateServiceKey'))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -27,6 +27,7 @@ void call(Map parameters = [:]) {
|
||||
piperStageWrapper (script: script, stageName: stageName, stashContent: [], stageLocking: false) {
|
||||
cloudFoundryCreateServiceKey script: parameters.script
|
||||
abapEnvironmentAssemblePackages script: parameters.script
|
||||
abapEnvironmentBuild(script: parameters.script, phase: 'GENERATION', downloadAllResultFiles: true, useFieldsOfAddonDescriptor: '[{"use":"Name","renameTo":"SWC"}]')
|
||||
abapAddonAssemblyKitRegisterPackages script: parameters.script
|
||||
abapAddonAssemblyKitReleasePackages script: parameters.script
|
||||
abapEnvironmentAssembleConfirm script: parameters.script
|
||||
|
@ -37,6 +37,8 @@ void call(Map parameters = [:]) {
|
||||
piperStageWrapper (script: script, stageName: stageName, stashContent: [], stageLocking: false) {
|
||||
try {
|
||||
abapEnvironmentCreateSystem(script: parameters.script, includeAddon: true)
|
||||
cloudFoundryCreateServiceKey(script: parameters.script)
|
||||
abapEnvironmentBuild(script: parameters.script, phase: 'GENERATION', downloadAllResultFiles: true, useFieldsOfAddonDescriptor: '[{"use":"Name","renameTo":"SWC"}]')
|
||||
} catch (Exception e) {
|
||||
echo "Deployment test of add-on product failed."
|
||||
throw e
|
||||
|
Loading…
x
Reference in New Issue
Block a user