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:
parent
32b9c95cdb
commit
3bf3afd7ac
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user