From ee7ebe3a50f3e3a74d98da4ce02ecb729eaaf4c8 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Thu, 18 Apr 2024 15:19:29 -0700 Subject: [PATCH 1/2] CI: Add make command to build and push HyperKit build base image --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index ade48fcbf7bc..c6006ef8017a 100644 --- a/Makefile +++ b/Makefile @@ -668,6 +668,13 @@ release-hyperkit-driver: install-hyperkit-driver checksum ## Copy hyperkit using gsutil cp $(GOBIN)/docker-machine-driver-hyperkit gs://minikube/drivers/hyperkit/$(VERSION)/ gsutil cp $(GOBIN)/docker-machine-driver-hyperkit.sha256 gs://minikube/drivers/hyperkit/$(VERSION)/ +.PHONY: build-and-push-hyperkit-build-image +build-and-push-hyperkit-build-image: + test -d out/xcgo || git clone https://github.com/neilotoole/xcgo.git out/xcgo + (cd out/xcgo && sed -i'.bak' -e 's/ARG GO_VERSION.*/ARG GO_VERSION="go$(GO_VERSION)"/' Dockerfile) + (cd out/xcgo && docker build -t gcr.io/k8s-minikube/xcgo:go$(GO_VERSION) .) + docker push gcr.io/k8s-minikube/xcgo:go$(GO_VERSION) + .PHONY: check-release check-release: ## Execute go test go test -timeout 42m -v ./deploy/minikube/release_sanity_test.go From fa174bb4c89b52b17a868db49bbd04386c118d0b Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Fri, 19 Apr 2024 10:06:58 -0700 Subject: [PATCH 2/2] add git pull to build-and-push-hyperkit-build-image --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c6006ef8017a..170e07778aea 100644 --- a/Makefile +++ b/Makefile @@ -671,8 +671,9 @@ release-hyperkit-driver: install-hyperkit-driver checksum ## Copy hyperkit using .PHONY: build-and-push-hyperkit-build-image build-and-push-hyperkit-build-image: test -d out/xcgo || git clone https://github.com/neilotoole/xcgo.git out/xcgo - (cd out/xcgo && sed -i'.bak' -e 's/ARG GO_VERSION.*/ARG GO_VERSION="go$(GO_VERSION)"/' Dockerfile) - (cd out/xcgo && docker build -t gcr.io/k8s-minikube/xcgo:go$(GO_VERSION) .) + (cd out/xcgo && git restore . && git pull && \ + sed -i'.bak' -e 's/ARG GO_VERSION.*/ARG GO_VERSION="go$(GO_VERSION)"/' Dockerfile && \ + docker build -t gcr.io/k8s-minikube/xcgo:go$(GO_VERSION) .) docker push gcr.io/k8s-minikube/xcgo:go$(GO_VERSION) .PHONY: check-release