Skip to content

Commit

Permalink
Create run-make-cmd.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
code-elinka committed Mar 30, 2023
1 parent 58f3b96 commit 74ef968
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions hack/run-make-cmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Run make commands that build and push images
# (see Dockerfiles in the root directory)

# ENV variables:
# * BINARY (example: "e2e-test")
# * ALL_ARCH (example: "amd64 arm64")
# * REGISTRY (container registry)
# * VERBOSE (example: -3)

BINARY=${BINARY:-e2e-test}
ARCH=${ARCH:-"amd64"}
ALL_ARCH=${ALL_ARCH:-"amd64 arm64"}
REGISTRY=${REGISTRY:-gcr.io/example}
VERBOSE=${VERBOSE:1}

# This command builds an image of $BINARY and
# pushes it to the $REGISTRY
make push VERBOSE="${VERBOSE}" CONTAINER_BINARIES="${BINARY}" \
REGISTRY="${REGISTRY}" ARCH="${ARCH}"
# Based on the image from the previous step,
# all-push command will try to create a multiarch image
# (there is no $ARCH parameter)
make all-push VERBOSE="${VERBOSE}" CONTAINER_BINARIES="${BINARY}" \
REGISTRY="${REGISTRY}" ALL_ARCH="${ALL_ARCH}"

0 comments on commit 74ef968

Please sign in to comment.