updated Jenkinsfile

This commit is contained in:
Marvin Zhang
2019-08-10 12:54:27 +08:00
parent b63b28e24c
commit 42ca1ed653

15
Jenkinsfile vendored
View File

@@ -53,22 +53,9 @@ pipeline {
echo 'Cleanup...'
sh """
# remove unused containers
container_ids=`docker ps -a | grep Exited | awk '{ print \$1 }' | xargs`
if [ \\$container_ids -eq "" ];
then
:
else
docker rm \$container_ids
fi
# remove unused images
image_ids=`docker images | grep '<none>' | grep -v IMAGE | awk '{ print \$3 }' | xargs`
if [ \\$image_ids -eq "" ];
then
:
else
docker rmi \$image_ids
fi
"""
}
}