Skip to content

Commit

Permalink
fix: create canary dockerhub manifest (#2849)
Browse files Browse the repository at this point in the history
The create-manifest job was not using the `DIST_TAG` and still only
deploying as `latest`
  • Loading branch information
spypsy authored Oct 13, 2023
1 parent 98b1679 commit 1d7bd26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions build-system/scripts/create_dockerhub_manifest
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fi

REPOSITORY=$1
ARCH_LIST=$2
DIST_TAG=${3:-"latest"}

echo "Repo: $REPOSITORY"
echo "Arch list: $ARCH_LIST"
Expand All @@ -26,7 +27,7 @@ USERNAME="aztecprotocolci"
IMAGE_TAG=$(extract_tag_version $REPOSITORY true)

MANIFEST_DEPLOY_URI=$ACCOUNT/$REPOSITORY:$IMAGE_TAG
MANIFEST_LATEST_URI=$ACCOUNT/$REPOSITORY:latest
MANIFEST_DIST_URI=$ACCOUNT/$REPOSITORY:$DIST_TAG

# Login to dockerhub.
dockerhub_login
Expand All @@ -42,11 +43,11 @@ do
IMAGE_DEPLOY_URI=$ACCOUNT/$REPOSITORY:$IMAGE_TAG-$A
echo "Adding image $IMAGE_DEPLOY_URI to manifest list $MANIFEST_DEPLOY_URI"
docker_or_dryrun manifest create $MANIFEST_DEPLOY_URI \
--amend $IMAGE_DEPLOY_URI
echo "Adding image $IMAGE_DEPLOY_URI to manifest list $MANIFEST_LATEST_URI"
docker_or_dryrun manifest create $MANIFEST_LATEST_URI \
--amend $IMAGE_DEPLOY_URI
--amend $IMAGE_DEPLOY_URI

echo "Adding image $IMAGE_DEPLOY_URI to manifest list $MANIFEST_DIST_URI"
docker_or_dryrun manifest create $MANIFEST_DIST_URI \
--amend $IMAGE_DEPLOY_URI
done

IFS=$OLD_IFS
Expand All @@ -56,6 +57,6 @@ echo "Pushing manifest list $MANIFEST_DEPLOY_URI..."
# Push the version tagged list
docker_or_dryrun manifest push --purge $MANIFEST_DEPLOY_URI

echo "Pushing manifest list $MANIFEST_LATEST_URI..."
echo "Pushing manifest list $MANIFEST_DIST_URI..."
# Push the latest tagged list
docker_or_dryrun manifest push --purge $MANIFEST_LATEST_URI
docker_or_dryrun manifest push --purge $MANIFEST_DIST_URI
2 changes: 1 addition & 1 deletion yarn-project/deploy_dockerhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extract_repo yarn-project /usr/src project
PROJECT_ROOT=$(pwd)/project/src/

for REPOSITORY in "pxe" "aztec-sandbox"; do
echo "Deploying $REPOSITORY $TAG"
echo "Deploying $REPOSITORY $DIST_TAG"
RELATIVE_PROJECT_DIR=$(query_manifest relativeProjectDir $REPOSITORY)
cd "$PROJECT_ROOT/$RELATIVE_PROJECT_DIR"

Expand Down

0 comments on commit 1d7bd26

Please sign in to comment.