Created
December 15, 2022 18:05
-
-
Save jayunit100/7341c01291fc75fca43bd3d6a7a24313 to your computer and use it in GitHub Desktop.
sonobuoy build script (fails) for debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
harborBase="harbor-repo.vmware.com/dockerhub-proxy-cache/library" | |
########### build sonobuoy binaries ######## | |
BINARY=sonobuoy | |
VERBOSE_FLAG=-v | |
GIT_VERSION="${releaseVersion}" | |
GIT_REF_LONG=$(git rev-parse --verify HEAD) | |
golangVersion=1.19.4 | |
# linux | |
docker run --rm -v "${PWD}:/go/src/github.com/vmware-tanzu/sonobuoy" -w "/go/src/github.com/vmware-tanzu/sonobuoy" \ | |
--env CGO_ENABLED=0 \ | |
--env GO111MODULE=on \ | |
--env GOOS=${GOOS:-linux} \ | |
--env GOARCH=${GOARCH:-amd64} \ | |
${harborBase}/golang:${golangVersion} \ | |
go build -o "${BINARY}-linux" ${VERBOSE_FLAG} -ldflags="-s -w -X github.com/vmware-tanzu/sonobuoy/pkg/buildinfo.Version=${GIT_VERSION} -X github.com/vmware-tanzu/sonobuoy/pkg/buildinfo.GitSHA=${GIT_REF_LONG}" github.com/vmware-tanzu/sonobuoy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment