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

fix code climate issues

This commit is contained in:
Marcus Holl 2019-05-17 14:52:27 +02:00
parent d7d36c9445
commit a24c89ce12
4 changed files with 30 additions and 27 deletions

View File

@ -39,4 +39,3 @@ def resolvePlugin(call) {
}
return null
}

View File

@ -7,24 +7,24 @@ groovy steps.groovy
[ -d jenkins_home ] && rm -rf jenkins_home
cp -r jenkins_home_init jenkins_home
CALLS="`pwd`/jenkins_home/piper/calls.json"
CALLS="$(pwd)/jenkins_home/piper/calls.json"
mkdir -p `dirname ${CALLS}`
mkdir -p $(dirname "${CALLS}")
mv target/performedCalls.json ${CALLS}
mv target/performedCalls.json "${CALLS}"
[ -f ${CALLS} ] || { echo "File \"${CALLS}\" does not exist." ; exit 1; }
[ -f "${CALLS}" ] || { echo "File \"${CALLS}\" does not exist." ; exit 1; }
cID=$(docker run -d -v `pwd`/jenkins_home:/var/jenkins_home --env calls=/var/jenkins_home/piper/calls.json --env result=/var/jenkins_home/piper/result.json ppiper/jenkins-master);
echo "ContainerId: ${cID}";
cID="$(docker run -d -v `pwd`/jenkins_home:/var/jenkins_home --env calls=/var/jenkins_home/piper/calls.json --env result=/var/jenkins_home/piper/result.json ppiper/jenkins-master)"
echo "ContainerId: ${cID}"
while true
do
[ -f jenkins_home/piper/result.json ] && { docker rm -f ${cID}; break; } # normal ...
[ -f jenkins_home/piper/FAILURE ] && { docker rm -f ${cID}; break; } # executing of our init script failed
docker ps --no-trunc |grep -q ${cID} || break # docker container does not run anymore
[ -f jenkins_home/piper/result.json ] && { docker rm -f "${cID}"; break; } # normal ...
[ -f jenkins_home/piper/FAILURE ] && { docker rm -f "${cID}"; break; } # executing of our init script failed
docker ps --no-trunc |grep -q "${cID}"|| break # docker container does not run anymore
echo "[INFO] waiting for results"
sleep 10
done
RESULT="`pwd`/jenkins_home/piper/result.json"
[ -f ${RESULT} ] && cat jenkins_home/piper/result.json
RESULT="$(pwd)/jenkins_home/piper/result.json"
[ -f "${RESULT}" ] && cat jenkins_home/piper/result.json

View File

@ -43,6 +43,10 @@ while(counter < 1600) {
for (def calledStep in calledSteps) {
if(calledStep in Map) {
// After some time not working on this I have acually forgotten
// what needs to be done here ... In order not to forget that
// here is maybe something missing we emit a log message.
System.err << "[DEBUG] This is not handled yet.(${calledStep})\n"
} else {
if(calledStep in piperSteps) {
toBeReplaced = calledStep