mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-28 05:47:08 +02:00
fix(security): remove duplicate stage wrapper (#1707)
* remove duplicate stage wrapper fixes #1705 * Update piperPipelineStageSecurity.groovy * fix trailing spaces
This commit is contained in:
parent
c42553593e
commit
1d1bf68d96
@ -25,12 +25,13 @@ import static com.sap.piper.Prerequisites.checkScript
|
||||
*/
|
||||
@GenerateStageDocumentation(defaultStageName = 'Security')
|
||||
void call(Map parameters = [:]) {
|
||||
|
||||
def script = checkScript(this, parameters) ?: this
|
||||
def utils = parameters.juStabUtils ?: new Utils()
|
||||
|
||||
def stageName = parameters.stageName?:env.STAGE_NAME
|
||||
|
||||
def securityScanMap = [:]
|
||||
|
||||
Map config = ConfigurationHelper.newInstance(this)
|
||||
.loadStepDefaults()
|
||||
.mixinGeneralConfig(script.commonPipelineEnvironment, GENERAL_CONFIG_KEYS)
|
||||
@ -40,11 +41,7 @@ void call(Map parameters = [:]) {
|
||||
.addIfEmpty('fortifyExecuteScan', script.commonPipelineEnvironment.configuration.runStep?.get(stageName)?.fortifyExecuteScan)
|
||||
.addIfEmpty('whitesourceExecuteScan', script.commonPipelineEnvironment.configuration.runStep?.get(stageName)?.whitesourceExecuteScan)
|
||||
.use()
|
||||
|
||||
piperStageWrapper (script: script, stageName: stageName) {
|
||||
|
||||
def securityScanMap = [:]
|
||||
|
||||
if (config.checkmarxExecuteScan) {
|
||||
securityScanMap['Checkmarx'] = {
|
||||
node(config.nodeLabel) {
|
||||
@ -87,14 +84,11 @@ void call(Map parameters = [:]) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (securityScanMap.size() > 0) {
|
||||
piperStageWrapper (script: script, stageName: stageName) {
|
||||
// telemetry reporting
|
||||
utils.pushToSWA([step: STEP_NAME], config)
|
||||
// telemetry reporting
|
||||
utils.pushToSWA([step: STEP_NAME], config)
|
||||
|
||||
parallel securityScanMap.plus([failFast: false])
|
||||
}
|
||||
parallel securityScanMap.plus([failFast: false])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user