diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2024-08-16 15:47:57 +0100 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2024-08-26 15:02:31 +0100 |
commit | dacc217afe3e4ae9f1bda96a285929016204701e (patch) | |
tree | 002d3b77387ef0d77c53b79db7927ba1be4645b2 /k6-tests | |
parent | 64ff45847a3466cb24a8dab57b65be753ee3cd03 (diff) |
[k6] Always pull latest cps and dmi stub images
Presently, k6 tests are using old cached DMI stub version in the
Jenkins job. This commit ensures latest images are pulled by
cleaning old images if a variable is set.
Issue-ID: CPS-2368
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I66a749c7cdeb7daee06a00b06dff50ead6854f28
Diffstat (limited to 'k6-tests')
-rwxr-xr-x | k6-tests/teardown.sh | 8 |
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 |