Move scripts used by travis jobs under travis folder because when mirroring all scripts folders are excluded

(cherry picked from commit 9a3588220b)
This commit is contained in:
cagache
2021-04-01 18:44:35 +03:00
committed by Cezar.Leahu
parent 7d3a85a449
commit 60602a57b9
19 changed files with 44 additions and 44 deletions

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -x
echo $imagesToBeDeleted
echo "List all images:"
docker images -a
docker_images_list=$(docker images | grep $imagesToBeDeleted | awk '{print $3}' | uniq)
if [ "$docker_images_list" == "" ]; then
echo "No docker images on the agent"
else
echo "Clearing images: $docker_images_list"
if docker rmi -f $docker_images_list ; then
echo "Deleting images was successful."
else
echo "Deleting specified images failed, so falling back to delete ALL images on system."
docker rmi -f $(docker images -aq)
fi
fi