mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
updated Jenkinsfile
This commit is contained in:
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@@ -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
|
||||
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user