1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-30 05:59:39 +02:00
This commit is contained in:
Sven Merk 2019-03-11 11:44:39 +01:00
parent e1092937af
commit 362bcb787f

View File

@ -359,10 +359,10 @@ void analyseWhitesourceResults(Map config, WhitesourceRepository repository, Whi
if (!config.productToken) {
def metaInfo = orgAdminRepository.fetchProductMetaInfo()
def key = "token"
if(!metaInfo && config.createProductFromPipeline) {
if(null != metaInfo && !metaInfo[key] && config.createProductFromPipeline) {
metaInfo = orgAdminRepository.createProduct()
key = "productToken"
} else if(!metaInfo) {
} else if(null == metaInfo || !metaInfo[key]) {
error "[WhiteSource] Could not fetch/find requested product '${config.productName}' and automatic creation has been disabled"
}
echo "Meta Info: ${metaInfo}"