Skip to content

Commit

Permalink
[ci force-deploy]
Browse files Browse the repository at this point in the history
  • Loading branch information
charlielye committed Dec 1, 2023
1 parent 79767ff commit 9eed4a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 60 deletions.
55 changes: 0 additions & 55 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -390,21 +390,6 @@ jobs:
name: "Build and test"
command: build aztec-sandbox

# aztec-sandbox-arm64:
# machine:
# image: ubuntu-2204:2023.07.2
# resource_class: arm.large
# steps:
# - *checkout
# - *setup_env
# - run:
# name: "Build and test"
# # We need to force not to use docker buildkit because for some reason on arm only, it ends up making a call
# # out to eu-west2 despite the image being locally tagged, resulting in unauthorized 401. Weird docker bug?
# command: |
# echo "export DOCKER_BUILDKIT=" > $BASH_ENV
# build aztec-sandbox

cli:
machine:
image: ubuntu-2204:2023.07.2
Expand All @@ -416,21 +401,6 @@ jobs:
name: "Build and test"
command: build cli

# cli-arm64:
# machine:
# image: ubuntu-2204:2023.07.2
# resource_class: arm.large
# steps:
# - *checkout
# - *setup_env
# - run:
# name: "Build and test"
# # We need to force not to use docker buildkit because for some reason on arm only, it ends up making a call
# # out to eu-west2 despite the image being locally tagged, resulting in unauthorized 401. Weird docker bug?
# command: |
# echo "export DOCKER_BUILDKIT=" > $BASH_ENV
# build cli

mainnet-fork:
machine:
image: ubuntu-2204:2023.07.2
Expand All @@ -453,19 +423,6 @@ jobs:
name: "Build and test"
command: build aztec-faucet | add_timestamps

# ecr-manifest:
# machine:
# image: ubuntu-2204:2023.07.2
# resource_class: large
# steps:
# - *checkout
# - *setup_env
# - run:
# name: "Create ECR manifest"
# command: |
# create_ecr_manifest aztec-sandbox x86_64,arm64
# create_ecr_manifest cli x86_64,arm64

boxes-blank-react:
machine:
image: ubuntu-2204:2023.07.2
Expand Down Expand Up @@ -1095,18 +1052,6 @@ workflows:
- aztec-sandbox: *defaults_yarn_project_prod
- cli: *defaults_yarn_project_prod
- aztec-faucet: *defaults_yarn_project_prod
# - aztec-sandbox-x86_64: *defaults_yarn_project_prod
# - aztec-sandbox-arm64: *defaults_yarn_project_prod
# - cli-x86_64: *defaults_yarn_project_prod
# - cli-arm64: *defaults_yarn_project_prod
# - aztec-faucet: *defaults_yarn_project_prod
# - ecr-manifest:
# requires:
# - aztec-sandbox-x86_64
# - aztec-sandbox-arm64
# - cli-x86_64
# - cli-arm64
# <<: *defaults

# Boxes.
- boxes-blank-react:
Expand Down
5 changes: 3 additions & 2 deletions build-system/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,14 @@ MULTIARCH=$(query_manifest multiarch $REPOSITORY)
if [ "$MULTIARCH" == "buildx" ]; then
# We've requested to use buildx. This will build both arch containers on the host machine using virtualization.
# The result is a single image tag that supports multiarch.
# This is the simplest approach for build jobs that are not too intensive.
docker buildx create --name builder --use
docker buildx inspect --bootstrap
docker buildx build -t $IMAGE_COMMIT_URI -f $DOCKERFILE --build-arg COMMIT_TAG=$COMMIT_TAG_VERSION --build-arg ARG_CONTENT_HASH=$CONTENT_HASH --platform linux/amd64,linux/arm64 . --push
else
# If multiarch is set to "host", the assumption is that we doing multiple builds on different architcture machines
# If multiarch is set to "host", the assumption is that we're doing multiple builds on different machine architectures
# in parallel, and that there is a another job that runs afterwards to combine them into a manifest.
# In this case we need to augment the image tag with this host architecture to ensure it's uniqueness.
# In this case we need to augment the image tag with the hosts architecture to ensure its uniqueness.
if [ "$MULTIARCH" == "host" ]; then
IMAGE_COMMIT_URI=$(calculate_image_uri $REPOSITORY host)
fi
Expand Down
9 changes: 6 additions & 3 deletions build-system/scripts/deploy_dockerhub
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ DST_URI=$DOCKERHUB_ACCOUNT/$REPOSITORY:$TAG
dockerhub_login
ecr_login

# Install skopeo, and immediately hack it to newer version.
sudo apt install -y skopeo
retry wget https://github.com/lework/skopeo-binary/releases/download/v1.13.3/skopeo-linux-amd64
mv ./skopeo-linux-amd64 ./skopeo && chmod +x ./skopeo
cmd_or_dryrun ./skopeo copy --all docker://$SRC_URI docker://$DST_URI
chmod +x ./skopeo-linux-amd64 && sudo mv ./skopeo-linux-amd64 /usr/bin/skopeo

cmd_or_dryrun skopeo copy --all docker://$SRC_URI docker://$DST_URI

if [ -n "$COMMIT_TAG" ]; then
# Publish as latest.
LATEST_URI=$DOCKERHUB_ACCOUNT/$REPOSITORY:latest
cmd_or_dryrun ./skopeo copy --all docker://$DST_URI docker://$LATEST_URI
cmd_or_dryrun skopeo copy --all docker://$DST_URI docker://$LATEST_URI
fi

0 comments on commit 9eed4a3

Please sign in to comment.