You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-09-16 09:26:22 +02:00
fix(checkmarx):disable failOnMissingReports (#4713)
* fix(checkmarx):disable failOnMissingReports * fix(checkmarx):disable failOnMissingReports --------- Co-authored-by: sumeet patil <sumeet.patil@sap.com>
This commit is contained in:
@@ -75,21 +75,4 @@ class CheckmarxExecuteScanTest extends BasePiperTest {
|
|||||||
assertThat(withEnvArgs[0], allOf(startsWith('PIPER_parametersJSON'), containsString('"testParam":"This is test content"')))
|
assertThat(withEnvArgs[0], allOf(startsWith('PIPER_parametersJSON'), containsString('"testParam":"This is test content"')))
|
||||||
assertThat(shellCallRule.shell[2], is('./piper checkmarxExecuteScan'))
|
assertThat(shellCallRule.shell[2], is('./piper checkmarxExecuteScan'))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void testCheckmarxExecuteScanNoReports() {
|
|
||||||
helper.registerAllowedMethod('fileExists', [Map], {
|
|
||||||
return false
|
|
||||||
})
|
|
||||||
|
|
||||||
exception.expect(AbortException)
|
|
||||||
exception.expectMessage("Expected to find checkmarxExecuteScan_reports.json in workspace but it is not there")
|
|
||||||
|
|
||||||
stepRule.step.checkmarxExecuteScan(
|
|
||||||
juStabUtils: utils,
|
|
||||||
jenkinsUtilsStub: jenkinsUtils,
|
|
||||||
testParam: "This is test content",
|
|
||||||
script: nullScript
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -7,5 +7,5 @@ import groovy.transform.Field
|
|||||||
|
|
||||||
void call(Map parameters = [:]) {
|
void call(Map parameters = [:]) {
|
||||||
List credentials = [[type: 'usernamePassword', id: 'checkmarxCredentialsId', env: ['PIPER_username', 'PIPER_password']], [type: 'token', id: 'githubTokenCredentialsId', env: ['PIPER_githubToken']]]
|
List credentials = [[type: 'usernamePassword', id: 'checkmarxCredentialsId', env: ['PIPER_username', 'PIPER_password']], [type: 'token', id: 'githubTokenCredentialsId', env: ['PIPER_githubToken']]]
|
||||||
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials, true)
|
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials)
|
||||||
}
|
}
|
||||||
|
@@ -8,5 +8,5 @@ import groovy.transform.Field
|
|||||||
void call(Map parameters = [:]) {
|
void call(Map parameters = [:]) {
|
||||||
List credentials = [[type: 'usernamePassword', id: 'checkmarxOneCredentialsId', env: ['PIPER_clientId', 'PIPER_clientSecret']],
|
List credentials = [[type: 'usernamePassword', id: 'checkmarxOneCredentialsId', env: ['PIPER_clientId', 'PIPER_clientSecret']],
|
||||||
[type: 'token', id: 'checkmarxOneAPIKey', env: ['PIPER_APIKey']]]
|
[type: 'token', id: 'checkmarxOneAPIKey', env: ['PIPER_APIKey']]]
|
||||||
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials, true)
|
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user