diff --git a/Dockerfile b/Dockerfile index 1e00813d5..9b257e066 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ ############# builder FROM eu.gcr.io/gardener-project/3rd/golang:1.16.2 AS builder +ENV BINARY_PATH=/go/bin WORKDIR /go/src/github.com/23technologies/gardener-extension-provider-hcloud + COPY . . RUN make build diff --git a/hack/build.sh b/hack/build.sh index 8eaeed52a..f299624bb 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -34,7 +34,7 @@ fi if [[ -z "${BINARY_PATH}" ]]; then export BINARY_PATH="${SOURCE_PATH}/bin" else - export BINARY_PATH="$(${READLINK_BIN} -f "${BINARY_PATH}")/bin" + export BINARY_PATH="$(${READLINK_BIN} -f "${BINARY_PATH}")" fi # The `go ` commands requires to see the target repository to be part of a @@ -68,14 +68,14 @@ if [[ -z "$LOCAL_BUILD" ]]; then -a \ -v \ -ldflags "$LD_FLAGS" \ - -o ${BINARY_PATH}/rel/gardener-extension-provider-hcloud \ + -o ${BINARY_PATH}/gardener-extension-provider-hcloud \ cmd/gardener-extension-provider-hcloud/main.go #CGO_ENABLED=0 GOOS=$(go env GOOS) GOARCH=$(go env GOARCH) go build \ # -a \ # -v \ # -ldflags "$LD_FLAGS" \ - # -o ${BINARY_PATH}/rel/gardener-extension-validator-hcloud \ + # -o ${BINARY_PATH}/gardener-extension-validator-hcloud \ # cmd/gardener-extension-validator-hcloud/main.go # If the LOCAL_BUILD environment variable is set, we simply run `go build`. else