Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/build-scripts:remove-containers into ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Konrad Zapałowicz
Approved revision: 4312492384e80ea69c5224706669061ff3a89eb1
Merged at revision: 0b9ed0685a50a5a708c50ebe2ab0f7eee25f98f6
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/build-scripts:remove-containers
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master
Diff against target: 30 lines (+8/-4)
2 files modified
jobs/generic-cleanup-snap (+3/-0)
scripts/test-snap.sh (+5/-4)
Reviewer Review Type Date Requested Status
Konrad Zapałowicz (community) Approve
System Enablement Bot continuous-integration Approve
Simon Fels Approve
Review via email: mp+322775@code.launchpad.net

Commit message

Cleanup containers after usage

Description of the change

Cleanup containers after usage

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) :
review: Needs Fixing
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Branch refreshed.

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

ack

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/generic-cleanup-snap b/jobs/generic-cleanup-snap
2index a260fe1..54fcc00 100755
3--- a/jobs/generic-cleanup-snap
4+++ b/jobs/generic-cleanup-snap
5@@ -27,3 +27,6 @@ $WORKSPACE/build-scripts/scripts/delete-ci-repo.py \
6 --git-repo=https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/$CI_REPO
7
8 $SSH rm -rf $REMOTE_RESULTS_BASE_DIR/$RESULTS_ID
9+
10+# Now remove any container that might have been left behind...
11+$SSH sudo docker rm $(sudo docker ps -q --filter=status=exited --filter=ancestor=snap-spread-tests)
12diff --git a/scripts/test-snap.sh b/scripts/test-snap.sh
13index b756c9b..6c0f04f 100755
14--- a/scripts/test-snap.sh
15+++ b/scripts/test-snap.sh
16@@ -85,10 +85,11 @@ EOF
17 $SSH time sudo docker build -t snap-spread-tests "$REMOTE_WORKSPACE"/docker
18
19 $SSH time sudo docker run \
20- -v /dev:/dev \
21- -v "$REMOTE_WORKSPACE":/build \
22- --privileged \
23- snap-spread-tests /build/run-tests.sh
24+ --rm \
25+ -v /dev:/dev \
26+ -v "$REMOTE_WORKSPACE":/build \
27+ --privileged \
28+ snap-spread-tests /build/run-tests.sh
29
30 $SSH sudo rm -rf "$REMOTE_WORKSPACE"
31

Subscribers

People subscribed via source and target branches