test: change CIV tag

We were using `latest` as tag, this can be dangerous as it's the default
tag, an anyone can accidentally update it. Using `prod` is safer.

Also use dev container image if the test script is running in CIV CI.
This commit is contained in:
Juan Abia 2022-09-06 15:09:31 +02:00 committed by jabia99
parent 84f46eebdb
commit 810f3fe0e9

View file

@ -216,7 +216,15 @@ fi
greenprint "Pulling cloud-image-val container"
CONTAINER_CLOUD_IMAGE_VAL="quay.io/cloudexperience/cloud-image-val-test:latest"
if [[ "$CI_PROJECT_NAME" =~ "cloud-image-val" ]]; then
# If running on CIV, get dev container
TAG=${CI_COMMIT_REF_SLUG}
else
# If not, get prod container
TAG="prod"
fi
CONTAINER_CLOUD_IMAGE_VAL="quay.io/cloudexperience/cloud-image-val-test:$TAG"
sudo ${CONTAINER_RUNTIME} pull ${CONTAINER_CLOUD_IMAGE_VAL}