#!/usr/bin/env bash # Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software will be governed # by the Apache License, Version 2.0. # # cloud-push – build cloud Docker images and push to personal Docker Hub. set -euo pipefail cd "$(dirname "$0")/.." . misc/shlib/shlib.bash if [[ $# -lt 2 ]]; then die "usage: $0 DOCKER-HUB-USERNAME ADDITIONAL-BUILD-METADATA [arguments for mzimage]" fi username=$1 shift additional_build_metadata=$1 shift version=$(bin/pyactivate -c "from materialize.mz_version import MzVersion; print(MzVersion.parse_cargo())") tag="$version--local.$additional_build_metadata" for image in environmentd clusterd; do bin/mzimage acquire --arch=aarch64 "$image" "$@" docker tag "$(bin/mzimage spec --arch=aarch64 "$image" "$@")" "$username/$image:$tag" docker push "$username/$image:$tag" done echo "Deploy this build to staging by running:" echo echo " $ bin/mz profile init --endpoint=https://staging.console.materialize.com --profile=staging" echo " $ bin/mz region enable --version $username:$tag --region=aws/us-east-1 --profile=staging" echo