X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fgeode%2Fapache-geode-test%2Fexecute_stressnew.sh;h=dd75d6bf75c0450dd21aecbfc272d2f66e717f9b;hb=e0d63fbfb52ac0c37bbcc073f4ed334a506044c1;hp=2f7b179db38bb3d7b0de47625a63d35a48a4f147;hpb=5fe5de7dbaf93789b5fd852e7e711a388a034f07;p=infra%2Fcicd.git diff --git a/jjb/geode/apache-geode-test/execute_stressnew.sh b/jjb/geode/apache-geode-test/execute_stressnew.sh index 2f7b179d..dd75d6bf 100755 --- a/jjb/geode/apache-geode-test/execute_stressnew.sh +++ b/jjb/geode/apache-geode-test/execute_stressnew.sh @@ -156,4 +156,14 @@ EXEC_COMMAND="bash -c 'echo Building with: $SEP \ sed -e 's/JAVA_HOME/GRADLE_JVM/g' -i.bak gradlewStrict $SEP \ GRADLE_JVM=${JAVA_BUILD_PATH} ./gradlewStrict ${GRADLE_ARGS}'" echo "${EXEC_COMMAND}" -eval "${EXEC_COMMAND}" \ No newline at end of file +eval "${EXEC_COMMAND}" + +# Cleanup +# Make sure all test containers are stopped and removed when tests are finished +DOCKER_CONTAINERS=$(sudo docker ps -a -q 2> /dev/null) +if [ -n "${DOCKER_CONTAINERS}" ]; then + docker stop ${DOCKER_CONTAINERS} > /dev/null + echo -e "Removing containers with ID:" + docker rm ${DOCKER_CONTAINERS} +fi +