Skip to content

Commit

Permalink
Merge pull request #629 from opensafely-core/evansd/remove-docker-foo…
Browse files Browse the repository at this point in the history
…tgun

Use `ehrql` rather than `databuilder` as canonical image name
  • Loading branch information
evansd authored Aug 9, 2023
2 parents 54a3617 + 8a6eb1f commit cfce01e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/update-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ if test "${1:-}" == ""; then
echo "usage: $0 image[:tag]"
exit 1
fi
if [[ $1 == databuilder* ]]; then
echo "'databuilder' is deprecated as an image name, use 'ehrql' instead."
echo "Note that updating ehrql will automatically update the databuilder image."
exit 1
fi
set -x

docker pull docker-proxy.opensafely.org/opensafely-core/$1
docker tag docker-proxy.opensafely.org/opensafely-core/$1 ghcr.io/opensafely-core/$1
# temp b/w compat tag
docker tag docker-proxy.opensafely.org/opensafely-core/$1 ghcr.io/opensafely/$1

# If the image being updated is databuilder, make sure we get the aliased ehrql tag too
if [[ $1 == databuilder* ]]; then
image=$(echo "$1" | sed -r 's/[databuilder]+/ehrql/g')
echo "Updating ehrql image: $image"
# If the image being updated is ehrql, make sure we get the aliased databuilder tag too
if [[ $1 == ehrql* ]]; then
image=$(echo "$1" | sed -r 's/[ehrql]+/databuilder/g')
echo "Updating databuilder image: $image"
docker pull docker-proxy.opensafely.org/opensafely-core/$image
docker tag docker-proxy.opensafely.org/opensafely-core/$image ghcr.io/opensafely-core/$image
fi
Expand Down

0 comments on commit cfce01e

Please sign in to comment.