Skip to content

Commit

Permalink
Improved ci/clean-build-package.sh for use on a new system
Browse files Browse the repository at this point in the history
Check if things exist before trying to remove them.

Ticket: none
Changelog: none
(cherry picked from commit d8bac4d)
  • Loading branch information
craigcomstock committed Oct 27, 2023
1 parent 48dd3bc commit 7ec7d17
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ci/clean-build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ set -ex
# clean up docker stuff
name=cfengine-build-package
# TODO: a softer clean might get into the container and run ./buildscripts/build-scripts/clean-buildmachine
docker stop $name
docker rm -f $name
docker rmi -f $name
if docker ps | grep $name; then
docker stop $name
fi
if docker ps -a | grep $name; then
docker rm $name
fi
if docker images | grep $name; then
docker rmi -f $name
fi

0 comments on commit 7ec7d17

Please sign in to comment.