Skip to content

Commit

Permalink
chore: fix docker.sh script (#6005)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
(cherry picked from commit ddb0e0f)

# Conflicts:
#	tools/releases/docker.sh
  • Loading branch information
jakubdyszkiewicz authored and mergify[bot] committed Feb 13, 2023
1 parent 553a099 commit af69970
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tools/releases/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ source "${SCRIPT_DIR}/../common.sh"

KUMA_DOCKER_REPO="${KUMA_DOCKER_REPO:-docker.io}"
KUMA_DOCKER_REPO_ORG="${KUMA_DOCKER_REPO_ORG:-${KUMA_DOCKER_REPO}/kumahq}"
<<<<<<< HEAD
KUMA_COMPONENTS="${KUMA_COMPONENTS:-kuma-cp kuma-dp kumactl kuma-init kuma-prometheus-sd}"
ENVOY_VERSION="${ENVOY_VERSION:-1.21.3}"
=======
KUMA_COMPONENTS="${KUMA_COMPONENTS:-kuma-cp kuma-dp kumactl kuma-init kuma-cni}"
BUILD_INFO=$("${SCRIPT_DIR}/../releases/version.sh")
ENVOY_VERSION=$(echo "$BUILD_INFO" | cut -d " " -f 5)
KUMA_VERSION=$(echo "$BUILD_INFO" | cut -d " " -f 1)
BUILD_ARCH="${BUILD_ARCH:-amd64 arm64}"
>>>>>>> ddb0e0fc1 (chore: fix docker.sh script (#6005))

function build() {
for component in ${KUMA_COMPONENTS}; do
Expand All @@ -21,6 +29,8 @@ function build() {
}

function docker_login() {
[ -z "$DOCKER_USERNAME" ] && msg_err "\$DOCKER_USERNAME required"
[ -z "$DOCKER_API_KEY" ] && msg_err "\$DOCKER_API_KEY required"
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_API_KEY" "$KUMA_DOCKER_REPO"
}

Expand All @@ -46,8 +56,6 @@ function usage() {
}

function main() {
KUMA_VERSION=$("${SCRIPT_DIR}/version.sh")

while [[ $# -gt 0 ]]; do
flag=$1
case $flag in
Expand All @@ -68,9 +76,6 @@ function main() {
shift
done

[ -z "$DOCKER_USERNAME" ] && msg_err "\$DOCKER_USERNAME required"
[ -z "$DOCKER_API_KEY" ] && msg_err "\$DOCKER_API_KEY required"

case $op in
build)
build
Expand Down

0 comments on commit af69970

Please sign in to comment.