diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ec60f3..53d4741 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -310,4 +310,4 @@ jobs: - name: Push Latest if: env.DOCKER_USR != '' - run: ./crossplane xpkg push -f conformance.xpkg index.docker.io/crossplane/conformance-testdata-configuration + run: ./crossplane xpkg push -f conformance.xpkg index.docker.io/crossplane/conformance-testdata-configuration:latest diff --git a/Makefile b/Makefile index 8cb5ba2..6afc419 100644 --- a/Makefile +++ b/Makefile @@ -19,9 +19,9 @@ GOLANGCILINT_VERSION = 2.2.2 -include build/makelib/golang.mk # Setup Images -DOCKER_REGISTRY = crossplane +REGISTRY_ORGS ?= docker.io/crossplane IMAGES = conformance -OSBASEIMAGE = gcr.io/distroless/static:nonroot +OSBASEIMAGE = gcr.io/distroless/static-debian12:nonroot -include build/makelib/imagelight.mk fallthrough: submodules diff --git a/cluster/images/conformance/Makefile b/cluster/images/conformance/Makefile index 9539dd5..a1c2414 100755 --- a/cluster/images/conformance/Makefile +++ b/cluster/images/conformance/Makefile @@ -3,25 +3,39 @@ include ../../../build/makelib/common.mk IMAGE = $(BUILD_REGISTRY)/conformance-$(ARCH) -# Note that this is actually the 'debug' variant of the static image, which -# includes a busybox shell with just enough functionality to turn regular old -# Go test output into the gzipped tarball of junit XML that Sonobuoy craves. -OSBASEIMAGE = gcr.io/distroless/static@sha256:aea3063d00e3969d57cc8903709b58c8ee813576fbba56a977eeb915515e4ff0 +# Note that this is actually the 'debug-nonroot' variant of the static-debian12 +# image, which includes a busybox shell with just enough functionality to turn +# regular old Go test output into the gzipped tarball of junit XML that Sonobuoy +# craves. +OSBASEIMAGE = gcr.io/distroless/static-debian12@sha256:f556e84ce8fb32fdd5a4478550b720330a22f13ff52dab68d7a7bb3a4266829d include ../../../build/makelib/imagelight.mk -ifeq ($(PLATFORM),$(filter $(PLATFORM),darwin_amd64 windows_amd64)) +ifeq ($(PLATFORM),$(filter $(PLATFORM),darwin_amd64 darwin_arm64 windows_amd64)) $(info Skipping image build for $(PLATFORM)) img.build: else img.build: @$(INFO) docker build $(IMAGE) + @$(MAKE) BUILD_ARGS="--load" img.build.shared + @$(OK) docker build $(IMAGE) +endif + +ifeq ($(PLATFORM),$(filter $(PLATFORM),darwin_amd64 darwin_arm64 windows_amd64)) +$(info Skipping image publish for $(PLATFORM)) +img.publish: +else +img.publish: + @$(INFO) docker publish $(IMAGE) + @$(MAKE) BUILD_ARGS="--push" img.build.shared + @$(OK) docker publish $(IMAGE) +endif + +img.build.shared: @cp Dockerfile $(IMAGE_TEMP_DIR) || $(FAIL) - @cp $(OUTPUT_DIR)/tests/$(OS)_$(ARCH)/tests $(IMAGE_TEMP_DIR)/conformance || $(FAIL) + @cp $(OUTPUT_DIR)/tests/linux_$(ARCH)/tests $(IMAGE_TEMP_DIR)/conformance || $(FAIL) @cp ../../../run.sh $(IMAGE_TEMP_DIR) || $(FAIL) @cd $(IMAGE_TEMP_DIR) && $(SED_CMD) 's|BASEIMAGE|$(OSBASEIMAGE)|g' Dockerfile || $(FAIL) - @docker build $(BUILD_ARGS) \ + @docker buildx build $(BUILD_ARGS) \ --platform linux/$(ARCH) \ -t $(IMAGE) \ - $(IMAGE_TEMP_DIR) || $(FAIL) - @$(OK) docker build $(IMAGE) -endif + $(IMAGE_TEMP_DIR) || $(FAIL) \ No newline at end of file