Merge pull request #125105 from BenTheElder/pause-build

pause: containerize wincat build
This commit is contained in:
Kubernetes Prow Robot 2024-05-23 13:38:35 -07:00 committed by GitHub
commit e5a98f8379
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,7 +118,13 @@ bin/${BIN.linux}-$(OS)-$(ARCH): $(SRCS)
$(TRIPLE)-strip $(foreach binary, $@, ${binary}${EXTENSION})"
bin/wincat-windows-${ARCH}: windows/wincat/wincat.go
CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -o $@ $^
mkdir -p bin
docker run --rm -u $$(id -u):$$(id -g) -v $$(pwd):/build \
--tmpfs /.cache \
$(KUBE_CROSS_IMAGE):$(KUBE_CROSS_VERSION) \
/bin/bash -c "\
cd /build && \
CGO_ENABLED=0 GOOS=windows GOARCH=${ARCH} go build -o $@ $^"
container: .container-${OS}-$(ARCH)
.container-linux-$(ARCH): bin/$(BIN)-$(OS)-$(ARCH)