Skip to content

Commit b0f6923

Browse files
Merge pull request #11212 from sharifelgamal/kicbase-build
Make sure to capture errors in auto kicbase builds
2 parents 6e771fd + fff2392 commit b0f6923

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ BUILD_IMAGE ?= us.gcr.io/k8s-artifacts-prod/build-image/kube-cross:v$(GO_VERSIO
5656
ISO_BUILD_IMAGE ?= $(REGISTRY)/buildroot-image
5757
KVM_BUILD_IMAGE ?= $(REGISTRY)/kvm-build-image:$(KVM_GO_VERSION)
5858

59-
KIC_BASE_IMAGE_GCR ?= $(REGISTRY)/kicbase:$(KIC_VERSION)
60-
KIC_BASE_IMAGE_HUB ?= kicbase/stable:$(KIC_VERSION)
61-
6259
ISO_BUCKET ?= minikube/iso
6360

6461
MINIKUBE_VERSION ?= $(ISO_VERSION)
@@ -688,7 +685,9 @@ docker-multi-arch-builder:
688685
env $(X_BUILD_ENV) docker buildx create --name $(X_DOCKER_BUILDER) --buildkitd-flags '--debug' || true
689686

690687
KICBASE_ARCH = linux/arm64,linux/amd64
691-
KICBASE_IMAGE_REGISTRIES ?= $(REGISTRY)/kicbase:$(KIC_VERSION) kicbase/stable:$(KIC_VERSION)
688+
KICBASE_IMAGE_GCR ?= $(REGISTRY)/kicbase:$(KIC_VERSION)
689+
KICBASE_IMAGE_HUB ?= kicbase/stable:$(KIC_VERSION)
690+
KICBASE_IMAGE_REGISTRIES ?= $(KICBASE_IMAGE_GCR) $(KICBASE_IMAGE_HUB)
692691

693692
.PHONY: push-kic-base-image
694693
push-kic-base-image: deploy/kicbase/auto-pause docker-multi-arch-builder ## Push multi-arch local/kicbase:latest to all remote registries
@@ -699,7 +698,7 @@ ifdef AUTOPUSH
699698
endif
700699
$(foreach REG,$(KICBASE_IMAGE_REGISTRIES), \
701700
@docker pull $(REG) && echo "Image already exist in registry" && exit 1 || echo "Image doesn't exist in registry";)
702-
ifndef AUTOPUSH
701+
ifndef CIBUILD
703702
$(call user_confirm, 'Are you sure you want to push $(KICBASE_IMAGE_REGISTRIES) ?')
704703
endif
705704
env $(X_BUILD_ENV) docker buildx build --builder $(X_DOCKER_BUILDER) --platform $(KICBASE_ARCH) $(addprefix -t ,$(KICBASE_IMAGE_REGISTRIES)) --push --build-arg COMMIT_SHA=${VERSION}-$(COMMIT) ./deploy/kicbase

hack/jenkins/kicbase_auto_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
set -x
17+
set -x -o pipefail
1818

1919
# Make sure docker is installed and configured
2020
./hack/jenkins/installers/check_install_docker.sh
@@ -61,7 +61,7 @@ export KICBASE_IMAGE_REGISTRIES="${GCR_IMG} ${DH_IMG}"
6161

6262

6363
# Build a new kicbase image
64-
yes | make push-kic-base-image | tee kic-logs.txt
64+
CIBUILD=yes make push-kic-base-image | tee kic-logs.txt
6565

6666
# Abort with error message if above command failed
6767
ec=$?

pkg/drivers/kic/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import (
2424

2525
const (
2626
// Version is the current version of kic
27-
Version = "v0.0.20-1618262794-11055"
27+
Version = "v0.0.20-1619543236-11212"
2828
// SHA of the kic base image
29-
baseImageSHA = "bd5383644dd35f84afaba199cf16aac1067c462d5e8ef96fa2c1183b3dee856c"
29+
baseImageSHA = "b7c6676a7c18654deb3258da55a95dec53983871e371186f217055256cda5b24"
3030
// The name of the GCR kicbase repository
3131
gcrRepo = "gcr.io/k8s-minikube/kicbase-builds"
3232
// The name of the Dockerhub kicbase repository

site/content/en/docs/commands/start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ minikube start [flags]
2626
--apiserver-names strings A set of apiserver names which are used in the generated certificate for kubernetes. This can be used if you want to make the apiserver available from outside the machine
2727
--apiserver-port int The apiserver listening port (default 8443)
2828
--auto-update-drivers If set, automatically updates drivers to the latest version. Defaults to true. (default true)
29-
--base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase-builds:v0.0.20-1618262794-11055@sha256:bd5383644dd35f84afaba199cf16aac1067c462d5e8ef96fa2c1183b3dee856c")
29+
--base-image string The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase-builds:v0.0.20-1619543236-11212@sha256:b7c6676a7c18654deb3258da55a95dec53983871e371186f217055256cda5b24")
3030
--cache-images If true, cache docker images for the current bootstrapper and load them into the machine. Always false with --driver=none. (default true)
3131
--cni string CNI plug-in to use. Valid options: auto, bridge, calico, cilium, flannel, kindnet, or path to a CNI manifest (default: auto)
3232
--container-runtime string The container runtime to be used (docker, cri-o, containerd). (default "docker")

site/content/en/docs/contrib/tests.en.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ validateLoadImage makes sure that `minikube load image` works as expected
8181
#### validateRemoveImage
8282
validateRemoveImage makes sures that `minikube rm image` works as expected
8383

84+
#### validateBuildImage
85+
validateBuildImage makes sures that `minikube image build` works as expected
86+
8487
#### validateDockerEnv
8588
check functionality of minikube after evaling docker-env
8689

@@ -345,4 +348,4 @@ TestKubernetesUpgrade upgrades Kubernetes from oldest to newest
345348
## TestMissingContainerUpgrade
346349
TestMissingContainerUpgrade tests a Docker upgrade where the underlying container is missing
347350

348-
TEST COUNT: 110
351+
TEST COUNT: 111

0 commit comments

Comments
 (0)