summaryrefslogtreecommitdiffstats
path: root/k6-tests/teardown.sh
diff options
context:
space:
mode:
authorDaniel Hanrahan <daniel.hanrahan@est.tech>2024-11-21 13:11:18 +0000
committerGerrit Code Review <gerrit@onap.org>2024-11-21 13:11:18 +0000
commite944fa76b5290890ebdcacad7bb9497f19df9a66 (patch)
treecbb383656c17283b9cfae7cee1cb12b657b4c6aa /k6-tests/teardown.sh
parent3e182a869fb05ac6d8061171555207aca7d1f8bd (diff)
parentb685df03750be0ee1b9c55632dceedb7dbf4961a (diff)
Merge "Add new k6 test profile for running edurance tests"
Diffstat (limited to 'k6-tests/teardown.sh')
-rwxr-xr-xk6-tests/teardown.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/k6-tests/teardown.sh b/k6-tests/teardown.sh
index 7693dc03a4..c3233919dc 100755
--- a/k6-tests/teardown.sh
+++ b/k6-tests/teardown.sh
@@ -18,11 +18,13 @@
echo '================================== docker info =========================='
docker ps -a
-echo 'Stopping, Removing containers and volumes...'
-docker_compose_cmd="docker-compose -f ../docker-compose/docker-compose.yml --profile dmi-stub down --volumes"
+testProfile=$1
+docker_compose_shutdown_cmd="docker-compose -f ../docker-compose/docker-compose.yml --profile dmi-stub --project-name $testProfile down --volumes"
+
# Set an environment variable CLEAN_DOCKER_IMAGES=1 to also remove docker images when done (used on jenkins job)
+echo "Stopping, Removing containers and volumes for $testProfile tests..."
if [ "${CLEAN_DOCKER_IMAGES:-0}" -eq 1 ]; then
- $docker_compose_cmd --rmi all
+ $docker_compose_shutdown_cmd --rmi all
else
- $docker_compose_cmd
+ $docker_compose_shutdown_cmd
fi