Skip to content

Commit

Permalink
DAS-1970: Switches image tag to be read from version.txt (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
flamingbear authored Sep 19, 2023
1 parent 8fc1088 commit 5e123ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions script/test-in-bamboo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@

set -ex

## Returns the correct image name to pull from docker. If the test name's

## Returns the image name to pull from docker. If the test name's
## environmental variable exists, return that, otherwise return the default
## value for the image.
## value for the image read from the version.txt file.
function image_name () {
base="regression-tests-$1"
recent_tag=$(<"./test/$1/version.txt")
env_image_name=$(echo "${base}_IMAGE" | tr '[:lower:]' '[:upper:]' | tr '-' '_')
default_image="ghcr.io/nasa/${base}:latest"
default_image="ghcr.io/nasa/${base}:${recent_tag}"
echo "${!env_image_name:-${default_image}}"
}

Expand Down

0 comments on commit 5e123ee

Please sign in to comment.