aboutsummaryrefslogtreecommitdiffstats
path: root/k6-tests
diff options
context:
space:
mode:
authorPriyank Maheshwari <priyank.maheshwari@est.tech>2024-08-27 10:37:35 +0000
committerGerrit Code Review <gerrit@onap.org>2024-08-27 10:37:35 +0000
commitb375a3ebe68818dbcf21377ad4c874eadaddf421 (patch)
tree4ca2f0169ea4bddcc5cef4a5ce800e921dc68252 /k6-tests
parent46dcedd9b003ffb601533c7f30e4cde02d2de941 (diff)
parentdacc217afe3e4ae9f1bda96a285929016204701e (diff)
Merge "[k6] Always pull latest cps and dmi stub images"
Diffstat (limited to 'k6-tests')
-rwxr-xr-xk6-tests/teardown.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/k6-tests/teardown.sh b/k6-tests/teardown.sh
index 1b4d721a23..7693dc03a4 100755
--- a/k6-tests/teardown.sh
+++ b/k6-tests/teardown.sh
@@ -19,4 +19,10 @@ echo '================================== docker info =========================='
docker ps -a
echo 'Stopping, Removing containers and volumes...'
-docker-compose -f ../docker-compose/docker-compose.yml --profile dmi-stub down --volumes
+docker_compose_cmd="docker-compose -f ../docker-compose/docker-compose.yml --profile dmi-stub down --volumes"
+# Set an environment variable CLEAN_DOCKER_IMAGES=1 to also remove docker images when done (used on jenkins job)
+if [ "${CLEAN_DOCKER_IMAGES:-0}" -eq 1 ]; then
+ $docker_compose_cmd --rmi all
+else
+ $docker_compose_cmd
+fi