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:
Marcus Holl
2019-03-29 16:31:09 +01:00
parent 78400cad9b
commit 2b1b743082
+2 -4
View File
@@ -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
}
}