From ad066ba4c017b3a6bc7ed3e3829d8bf07d8c53e3 Mon Sep 17 00:00:00 2001 From: Andrea Culot Date: Tue, 17 Oct 2023 22:00:40 +0100 Subject: [PATCH] Clean up images after running integ tests --- test/integration/codebuild/buildspec.os.alpine.1.yml | 3 ++- test/integration/codebuild/buildspec.os.alpine.2.yml | 1 + test/integration/codebuild/buildspec.os.amazonlinux.2.yml | 3 ++- test/integration/codebuild/buildspec.os.amazonlinux.2023.yml | 3 ++- test/integration/codebuild/buildspec.os.centos.yml | 3 ++- test/integration/codebuild/buildspec.os.debian.2.yml | 3 ++- test/integration/codebuild/buildspec.os.debian.yml | 3 ++- test/integration/codebuild/buildspec.os.ubuntu.1.yml | 3 ++- test/integration/codebuild/buildspec.os.ubuntu.2.yml | 3 ++- 9 files changed, 17 insertions(+), 8 deletions(-) diff --git a/test/integration/codebuild/buildspec.os.alpine.1.yml b/test/integration/codebuild/buildspec.os.alpine.1.yml index 701594c2..dc3ceae7 100644 --- a/test/integration/codebuild/buildspec.os.alpine.1.yml +++ b/test/integration/codebuild/buildspec.os.alpine.1.yml @@ -109,4 +109,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.alpine.2.yml b/test/integration/codebuild/buildspec.os.alpine.2.yml index 7d194341..9ba6dd83 100644 --- a/test/integration/codebuild/buildspec.os.alpine.2.yml +++ b/test/integration/codebuild/buildspec.os.alpine.2.yml @@ -102,3 +102,4 @@ phases: - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.amazonlinux.2.yml b/test/integration/codebuild/buildspec.os.amazonlinux.2.yml index 75257c5b..9426db59 100644 --- a/test/integration/codebuild/buildspec.os.amazonlinux.2.yml +++ b/test/integration/codebuild/buildspec.os.amazonlinux.2.yml @@ -105,4 +105,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml b/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml index 9083fbb0..36751605 100644 --- a/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml +++ b/test/integration/codebuild/buildspec.os.amazonlinux.2023.yml @@ -104,4 +104,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.centos.yml b/test/integration/codebuild/buildspec.os.centos.yml index c5bc27c2..49c92f17 100644 --- a/test/integration/codebuild/buildspec.os.centos.yml +++ b/test/integration/codebuild/buildspec.os.centos.yml @@ -107,4 +107,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.debian.2.yml b/test/integration/codebuild/buildspec.os.debian.2.yml index dbb6984a..bee81012 100644 --- a/test/integration/codebuild/buildspec.os.debian.2.yml +++ b/test/integration/codebuild/buildspec.os.debian.2.yml @@ -107,4 +107,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.debian.yml b/test/integration/codebuild/buildspec.os.debian.yml index 9952ade8..a9160321 100644 --- a/test/integration/codebuild/buildspec.os.debian.yml +++ b/test/integration/codebuild/buildspec.os.debian.yml @@ -109,4 +109,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.ubuntu.1.yml b/test/integration/codebuild/buildspec.os.ubuntu.1.yml index 27e8962b..2427e5ac 100644 --- a/test/integration/codebuild/buildspec.os.ubuntu.1.yml +++ b/test/integration/codebuild/buildspec.os.ubuntu.1.yml @@ -107,4 +107,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true diff --git a/test/integration/codebuild/buildspec.os.ubuntu.2.yml b/test/integration/codebuild/buildspec.os.ubuntu.2.yml index 21ce6ea6..3875078a 100644 --- a/test/integration/codebuild/buildspec.os.ubuntu.2.yml +++ b/test/integration/codebuild/buildspec.os.ubuntu.2.yml @@ -105,4 +105,5 @@ phases: - docker rm --force "${OS_DISTRIBUTION}-app" || true - docker stop "${OS_DISTRIBUTION}-tester" || true - docker rm --force "${OS_DISTRIBUTION}-tester" || true - - docker network rm "${OS_DISTRIBUTION}-network" || true \ No newline at end of file + - docker network rm "${OS_DISTRIBUTION}-network" || true + - docker rmi "${IMAGE_TAG}" || true