1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

Added debug output

This commit is contained in:
Sven Merk 2019-03-04 23:09:40 +01:00
parent 32b9c95cdb
commit 3bf3afd7ac
2 changed files with 9 additions and 1 deletions

View File

@ -234,6 +234,8 @@ class WhitesourceRepository implements Serializable {
@NonCPS
protected void fetchFileFromWhiteSource(String fileName, Map params) {
if(config.verbose)
script.echo "Entered routine to send file download request"
handleAdditionalRequestParameters(params)
def serializedContent = new JsonUtils().jsonToString(params)
@ -243,7 +245,8 @@ class WhitesourceRepository implements Serializable {
script.sh "${config.verbose ? '' : '#!/bin/sh -e\n'}curl -o ${fileName} -X POST ${config.serviceUrl} -H 'Content-Type: application/json' -d \'${serializedContent}\'"
}
private void handleAdditionalRequestParameters(params) {
@NonCPS
protected void handleAdditionalRequestParameters(params) {
if(config.userKey)
params["userKey"] = config.userKey
}

View File

@ -197,6 +197,11 @@ private def triggerWhitesourceScanWithUserKey(script, config, utils, descriptorU
statusCode = sh(script: "${javaCmd} ${options.join(' ')} ${config.agentParameters}", returnStatus: true)
if (config.jreDownloadUrl) {
sh "rm -r ./bin ./conf ./legal ./lib ./man"
javaCmd = './bin/java'
}
// archive whitesource result files
archiveArtifacts artifacts: "whitesource/*.*", allowEmptyArchive: true
}