Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit 94dc66c

Browse files
author
s4sdkJenkinsBot
committed
Merge branch 'master' into release
2 parents 56a62f4 + f7b03b5 commit 94dc66c

16 files changed

+82
-150
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test {
4646
}
4747

4848
task downloadPiper(type: Download) {
49-
src 'https://github.com/SAP/jenkins-library/releases/download/v1.54.0/jenkins-library.jar'
49+
src 'https://github.com/SAP/jenkins-library/releases/download/v1.58.0/jenkins-library.jar'
5050
dest 'libs/jenkins-library.jar'
5151
onlyIfModified true
5252
}

resources/containers_map.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ containerMaps:
4242
- executeNpm
4343
endToEndTests:
4444
- mavenExecute
45-
- executeNpm
45+
- npmExecuteScripts
4646
- cloudFoundryDeploy
4747
- neoDeploy
4848
- cloudFoundryCreateService
@@ -62,7 +62,7 @@ containerMaps:
6262
- sonarExecuteScan
6363
productionDeployment:
6464
- mavenExecute
65-
- executeNpm
65+
- npmExecuteScripts
6666
- cloudFoundryDeploy
6767
- neoDeploy
6868
- cloudFoundryCreateService

resources/default_s4_pipeline_environment.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,14 @@ steps:
5353
testsPublishResults:
5454
junit:
5555
active: true
56-
pattern: '**/target/surefire-reports/*.xml,s4hana_pipeline/reports/backend-unit/**,s4hana_pipeline/reports/frontend-integration/**/*.xml'
56+
pattern: '**/target/surefire-reports/*.xml,s4hana_pipeline/reports/backend-unit/**,s4hana_pipeline/reports/frontend-integration/**/*.xml,s4hana_pipeline/reports/e2e/*.xml'
5757
jacoco:
5858
active: false
5959
cobertura:
6060
active: false
61+
cucumber:
62+
active: false
63+
pattern: 's4hana_pipeline/reports/e2e/*.json'
6164

6265
checkFindbugs:
6366
includeFilterFile: s4hana_findbugs_include_filter.xml
@@ -132,3 +135,12 @@ stages:
132135

133136
s4SdkQualityChecks:
134137
disabledChecks: []
138+
139+
endToEndTests:
140+
stageLocking: true
141+
lockingResource: 'endToEndTest'
142+
143+
productionDeployment:
144+
stageLocking: true
145+
lockingResource: 'productionDeployment'
146+
ordinal: 80

src/com/sap/cloud/sdk/s4hana/pipeline/E2ETestCommandHelper.groovy

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/com/sap/cloud/sdk/s4hana/pipeline/EndToEndTestType.groovy

Lines changed: 0 additions & 12 deletions
This file was deleted.

vars/checkLegacyConfiguration.groovy

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def call(Map parameters) {
1717
checkArtifactSetVersion(script)
1818
checkAutomaticVersioning(script)
1919
checkGlobalExtensionConfiguration(script)
20+
checkTmsUpload(script)
21+
checkEndToEndTestsAppUrl(script)
2022
}
2123

2224
void checkGlobalExtensionConfiguration(Script script) {
@@ -84,6 +86,16 @@ void checkStaticCodeChecksConfig(Script script) {
8486
}
8587
}
8688

89+
void checkTmsUpload(Script script) {
90+
if (loadEffectiveStageConfiguration(script: script, stageName: 'productionDeployment').tmsUpload) {
91+
failWithConfigError("Your pipeline configuration contains an entry tmsUpload in the stage productionDeployment. " +
92+
"This configuration option was removed in version v39. " +
93+
"Please configure the step tmsUpload instead. " +
94+
"Details can be found in the release notes at https://github.com/SAP/cloud-s4-sdk-pipeline/releases/tag/v39 as well as in the step documentation: https://sap.github.io/jenkins-library/steps/tmsUpload/."
95+
)
96+
}
97+
}
98+
8799
void checkSharedConfig(Script script) {
88100
if (script.commonPipelineEnvironment.configuration.general?.sharedConfiguration) {
89101
failWithConfigError("Your pipeline configuration contains an entry for the sharedConfiguration in the general section. " +
@@ -123,6 +135,47 @@ void checkAutomaticVersioning(Script script){
123135
}
124136
}
125137

138+
void checkEndToEndTestsAppUrl(Script script) {
139+
Map e2eStageConfig = loadEffectiveStageConfiguration(script: script, stageName: 'endToEndTests')
140+
Map prodStageConfig = loadEffectiveStageConfiguration(script: script, stageName: 'productionDeployment')
141+
142+
if (e2eStageConfig?.appUrls instanceof String) {
143+
failWithConfigError("The configuration key appUrls in the endToEndTests stage configuration must not be a string anymore. " +
144+
"Please configure appUrls as a list of maps. For example:\n" +
145+
"appUrls: \n" + " - url: 'https://my-url.com'\n" + " credentialId: myCreds\n" +
146+
"More details can be found in the documentation: https://sap.github.io/jenkins-library/steps/npmExecuteEndToEndTests/#parameters")
147+
}
148+
if (prodStageConfig?.appUrls instanceof String) {
149+
failWithConfigError("The configuration key appUrls in the productionDeployment stage configuration must not be a string anymore. " +
150+
"Please configure appUrls as a list of maps. For example:\n" +
151+
"appUrls: \n" + " - url: 'https://my-url.com'\n" + " credentialId: myCreds\n" +
152+
"More details can be found in the documentation: https://sap.github.io/jenkins-library/steps/npmExecuteEndToEndTests/#parameters")
153+
}
154+
155+
if (e2eStageConfig?.appUrls) {
156+
for (int i = 0; i < e2eStageConfig.appUrls.size(); i++) {
157+
Map appUrl = e2eStageConfig.appUrls[i]
158+
if (appUrl.parameters instanceof String) {
159+
failWithConfigError("The configuration key parameters in the endToEndTests stage configuration must not be a string anymore. " +
160+
"Please configure parameters as a list of strings. For example:\n" +
161+
"appUrls: \n" + " - url: 'https://my-url.com'\n" + " parameters: ['--tag', 'scenario1']\n" +
162+
"More details can be found in the documentation: https://sap.github.io/jenkins-library/steps/npmExecuteEndToEndTests/#parameters")
163+
}
164+
}
165+
}
166+
if (prodStageConfig?.appUrls) {
167+
for (int i = 0; i < prodStageConfig.appUrls.size(); i++) {
168+
Map appUrl = prodStageConfig.appUrls[i]
169+
if (appUrl.parameters instanceof String) {
170+
failWithConfigError("The configuration key parameters in the productionDeployment stage configuration must not be a string anymore. " +
171+
"Please configure parameters as a list of strings. For example:\n" +
172+
"appUrls: \n" + " - url: 'https://my-url.com'\n" + " parameters: ['--tag', 'scenario1']\n" +
173+
"More details can be found in the documentation: https://sap.github.io/jenkins-library/steps/npmExecuteEndToEndTests/#parameters")
174+
}
175+
}
176+
}
177+
}
178+
126179
private checkRenamedStep(Script script, String oldName, String newName) {
127180
if (loadEffectiveStepConfiguration(script: script, stepName: oldName)) {
128181
failWithConfigError("The configuration key ${oldName} in the steps configuration may not be used anymore. " +

vars/checkoutAndInitLibrary.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def call(Map parameters) {
1010

1111
Map scmCheckoutResult = checkout(parameters.checkoutMap ?: scm)
1212

13-
initS4SdkPipelineLibrary script: script, configFile: parameters.configFile, customDefaults: parameters.customDefaults
13+
initS4SdkPipelineLibrary script: script, configFile: parameters.configFile, customDefaults: parameters.customDefaults, customDefaultsFromFiles: parameters.customDefaultsFromFiles
1414

1515
if (scmCheckoutResult.GIT_COMMIT) {
1616
ReportAggregator.instance.reportVersionControlUsed('Git')

vars/cloudSdkPipeline.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void call(parameters) {
5757
parallel {
5858
stage("End to End Tests") {
5959
when { expression { parameters.script.commonPipelineEnvironment.configuration.runStage.E2E_TESTS } }
60-
steps { stageEndToEndTests script: parameters.script }
60+
steps { piperPipelineStageAcceptance script: parameters.script, stageName: 'endToEndTests' }
6161
}
6262
stage("Performance Tests") {
6363
when { expression { parameters.script.commonPipelineEnvironment.configuration.runStage.PERFORMANCE_TESTS } }
@@ -110,8 +110,8 @@ void call(parameters) {
110110

111111
stage('Production Deployment') {
112112
when { expression { parameters.script.commonPipelineEnvironment.configuration.runStage.PRODUCTION_DEPLOYMENT } }
113-
//milestone 80 is set in stageProductionDeployment
114-
steps { stageProductionDeployment script: parameters.script }
113+
// "ordinal 80" is configured for stage "productionDeployment" in pipeline defaults
114+
steps { piperPipelineStageRelease script: parameters.script, stageName: 'productionDeployment' }
115115
}
116116

117117
}

vars/executeEndToEndTest.groovy

Lines changed: 0 additions & 90 deletions
This file was deleted.

vars/initS4sdkPipeline.groovy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,18 @@ def call(Map parameters) {
4444

4545
script.commonPipelineEnvironment.gitCommitId = getGitCommitId()
4646

47+
script.commonPipelineEnvironment.projectName = projectName
4748
String prefix = projectName
4849

4950
script.commonPipelineEnvironment.configuration.currentBuildResultLock = "${prefix}/currentBuildResult"
5051
script.commonPipelineEnvironment.configuration.performanceTestLock = "${prefix}/performanceTest"
51-
script.commonPipelineEnvironment.configuration.endToEndTestLock = "${prefix}/endToEndTest"
52-
script.commonPipelineEnvironment.configuration.productionDeploymentLock = "${prefix}/productionDeployment"
5352
script.commonPipelineEnvironment.configuration.stashFiles = "${prefix}/stashFiles/${env.BUILD_TAG}"
5453

5554
initNpmModules()
5655

56+
//todo load with customized default config for now until issue 8490 is resolved
57+
piperInitRunStageConfiguration script: script, stageConfigResource: 'com.sap.piper/pipeline/cloudSdkStageDefaults.yml'
58+
5759
initStageSkipConfiguration script: script
5860
}
5961

0 commit comments

Comments
 (0)