From 924019e8e7739af27d206699f8317efe2273b167 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Mon, 10 Oct 2022 11:14:03 -0700 Subject: [PATCH] update push/pull scripts to reflect 3-stage build --- devel/copy-images | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/devel/copy-images b/devel/copy-images index a9c372e5..baaeee02 100755 --- a/devel/copy-images +++ b/devel/copy-images @@ -33,7 +33,8 @@ if [[ "$tag" = "" ]]; then exit 1 fi -BUILDER_IMAGE=nextstrain/base-builder +NATIVE_BUILDER_IMAGE=nextstrain/base-native-builder +EMULATED_BUILDER_IMAGE=nextstrain/base-emulated-builder FINAL_IMAGE=nextstrain/base @@ -77,26 +78,36 @@ copy-image() { # Copy $tag between registries. +echo "Copying $registry_in/$NATIVE_BUILDER_IMAGE:$tag to $registry_out/$NATIVE_BUILDER_IMAGE:$tag." +copy-image \ + "$registry_in/$NATIVE_BUILDER_IMAGE:$tag" \ + "$registry_out/$NATIVE_BUILDER_IMAGE:$tag" + +echo "Copying $registry_in/$EMULATED_BUILDER_IMAGE:$tag to $registry_out/$EMULATED_BUILDER_IMAGE:$tag." +copy-image \ + "$registry_in/$EMULATED_BUILDER_IMAGE:$tag" \ + "$registry_out/$EMULATED_BUILDER_IMAGE:$tag" + echo "Copying $registry_in/$FINAL_IMAGE:$tag to $registry_out/$FINAL_IMAGE:$tag." copy-image \ "$registry_in/$FINAL_IMAGE:$tag" \ "$registry_out/$FINAL_IMAGE:$tag" -echo "Copying $registry_in/$BUILDER_IMAGE:$tag to $registry_out/$BUILDER_IMAGE:$tag." -copy-image \ - "$registry_in/$BUILDER_IMAGE:$tag" \ - "$registry_out/$BUILDER_IMAGE:$tag" - if [[ "$push_latest" = true ]]; then # Copy $tag to latest. + echo "Copying $registry_in/$NATIVE_BUILDER_IMAGE:$tag to $registry_out/$NATIVE_BUILDER_IMAGE:latest." + copy-image \ + "$registry_in/$NATIVE_BUILDER_IMAGE:$tag" \ + "$registry_out/$NATIVE_BUILDER_IMAGE:latest" + + echo "Copying $registry_in/$EMULATED_BUILDER_IMAGE:$tag to $registry_out/$EMULATED_BUILDER_IMAGE:latest." + copy-image \ + "$registry_in/$EMULATED_BUILDER_IMAGE:$tag" \ + "$registry_out/$EMULATED_BUILDER_IMAGE:latest" + echo "Copying $registry_in/$FINAL_IMAGE:$tag to $registry_out/$FINAL_IMAGE:latest." copy-image \ "$registry_in/$FINAL_IMAGE:$tag" \ "$registry_out/$FINAL_IMAGE:latest" - - echo "Copying $registry_in/$BUILDER_IMAGE:$tag to $registry_out/$BUILDER_IMAGE:latest." - copy-image \ - "$registry_in/$BUILDER_IMAGE:$tag" \ - "$registry_out/$BUILDER_IMAGE:latest" fi