mirror of
https://github.com/SAP/jenkins-library.git
synced 2026-06-19 22:58:55 +02:00
provide the log in case of a failure always, not only in docker context
from property dockerImage we cannot conclude that we are in fact running inside a docker environment. Step dockerExecute has some checks if we are in a docker context. If not there is a fallback to the local environment. The docker image property is provided from resources/default_pipeline_environment (value: 's4sdk/docker-neo-cli'). Hence a value will be present all the time (exception: someone configured null/ empty string explicitly). So we will enter the corresponding code block anyway. It is IMO also desirable to have the neo log in the job log when running inside a non-docker setup since this simplifies troubleshooting anyway.
This commit is contained in:
@@ -137,10 +137,8 @@ private deploy(script, utils, Map configuration, NeoCommandHelper neoCommandHelp
|
||||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
if (dockerImage) {
|
||||
echo "Error while deploying to SAP Cloud Platform. Here are the neo.sh logs:"
|
||||
sh "cat logs/neo/*"
|
||||
}
|
||||
echo "Error while deploying to SAP Cloud Platform. Here are the neo.sh logs:"
|
||||
sh "cat logs/neo/*"
|
||||
throw ex
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user