Skip to content

Commit

Permalink
test: change CIV tag
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
juan-abia authored and runcom committed Sep 15, 2022
1 parent 2029fd0 commit f40178d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/cases/aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit f40178d

Please sign in to comment.