Skip to content

Commit

Permalink
[antithesis] Skip push for builder image (#3070)
Browse files Browse the repository at this point in the history
  • Loading branch information
marun authored Jun 3, 2024
1 parent 9b30547 commit 0893516
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions scripts/build_antithesis_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ function build_images {
docker_cmd="${docker_cmd} --build-arg AVALANCHEGO_NODE_IMAGE=antithesis-avalanchego-node:${TAG}"
fi

if [[ "${test_setup}" == "avalanchego" ]]; then
# Build the image that enables compiling golang binaries for the node and workload
# image builds. The builder image is intended to enable building instrumented binaries
# if built on amd64 and non-instrumented binaries if built on arm64.
#
# The builder image is not intended to be pushed so it needs to be built in advance of
# adding `--push` to docker_cmd. Since it is never prefixed with `[registry]/[repo]`,
# attempting to push will result in an error like `unauthorized: access token has
# insufficient scopes`.
${docker_cmd} -t "${builder_image_name}" -f "${builder_dockerfile}" "${AVALANCHE_PATH}"
fi

if [[ -n "${image_prefix}" && -z "${node_only}" ]]; then
# Push images with an image prefix since the prefix defines a
# registry location, and only if building all images. When
Expand All @@ -82,13 +94,6 @@ function build_images {
docker_cmd="${docker_cmd} --push"
fi

if [[ "${test_setup}" == "avalanchego" ]]; then
# Build the image that enables compiling golang binaries for the node and workload
# image builds. The builder image is intended to enable building instrumented binaries
# if built on amd64 and non-instrumented binaries if built on arm64.
${docker_cmd} -t "${builder_image_name}" -f "${builder_dockerfile}" "${AVALANCHE_PATH}"
fi

# Build node image first to allow the workload image to use it.
${docker_cmd} -t "${node_image_name}" -f "${node_dockerfile}" "${AVALANCHE_PATH}"

Expand Down

0 comments on commit 0893516

Please sign in to comment.