Skip to content

Commit

Permalink
Merge pull request #900 from sdowell/debian-build-image
Browse files Browse the repository at this point in the history
use debian build image and bash build scripts
  • Loading branch information
k8s-ci-robot authored Jun 21, 2024
2 parents 1b5c314 + aece850 commit 9d32cb1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ IMAGE := $(REGISTRY)/$(BIN)
TAG := $(VERSION)
OS_ARCH_TAG := $(TAG)__$(OS)_$(ARCH)

BUILD_IMAGE ?= golang:1.22-alpine
BUILD_IMAGE ?= golang:1.22

DBG_MAKEFILE ?=
ifneq ($(DBG_MAKEFILE),1)
Expand Down
5 changes: 3 additions & 2 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Copyright 2016 The Kubernetes Authors.
#
Expand All @@ -16,6 +16,7 @@

set -o errexit
set -o nounset
set -o pipefail

if [ -z "${ARCH:-}" ]; then
echo "ARCH must be set"
Expand All @@ -34,7 +35,7 @@ export CGO_ENABLED=0
export GOARCH="${ARCH}"
export GOOS="${OS}"

if [ "${BUILD_DEBUG:-0}" -eq 1 ]; then
if [[ "${BUILD_DEBUG:-0}" == 1 ]]; then
# Debugging - disable optimizations and inlining
gogcflags="all=-N -l"
goasmflags=""
Expand Down
7 changes: 4 additions & 3 deletions build/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Copyright 2016 The Kubernetes Authors.
#
Expand All @@ -16,6 +16,7 @@

set -o errexit
set -o nounset
set -o pipefail

export CGO_ENABLED=0
export GOFLAGS="-mod=vendor"
Expand All @@ -24,7 +25,7 @@ echo "Running tests:"
go test -installsuffix "static" "$@"
echo

echo "Checking gofmt: "
echo -n "Checking gofmt: "
ERRS="$(go fmt "$@")"
if [ -n "${ERRS}" ]; then
echo "FAIL - the following files need to be gofmt'ed:"
Expand All @@ -37,7 +38,7 @@ fi
echo "PASS"
echo

echo "Checking go vet: "
echo -n "Checking go vet: "
ERRS="$(go vet "$@" 2>&1 || true)"
if [ -n "${ERRS}" ]; then
echo "FAIL"
Expand Down

0 comments on commit 9d32cb1

Please sign in to comment.