Skip to content

build: enable multi-platform image publishing again#36

Merged
jbw976 merged 1 commit into
crossplane:mainfrom
jbw976:modernize
Sep 17, 2025
Merged

build: enable multi-platform image publishing again#36
jbw976 merged 1 commit into
crossplane:mainfrom
jbw976:modernize

Conversation

@jbw976

@jbw976 jbw976 commented Sep 17, 2025

Copy link
Copy Markdown
Member

Description of your changes

This used to work with the old build submodule and image.mk, but I noticed we're no longer pushing multi-platform images now to https://hub.docker.com/repository/docker/crossplane/conformance/tags. This became obvious when running conformance tests with crossplane/conformance:master and seeing:

message: 'rpc error: code = NotFound desc = failed to pull and unpack image
          "docker.io/crossplane/conformance:master": no match for platform in manifest:
          not found'
        reason: ErrImagePull

With crossplane/build and imagelight.mk, we need to do the following with this PR:

  • use --platform $(IMAGE_PLATFORMS) for docker buildx to build for all platforms
  • copy all architectures of the compiled test binary to IMAGE_TEMP_DIR
  • copy specific compiled conformance test binary in Dockerfile

I have:

  • Read and followed conformance's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

I have built/published the changes in this PR to jbw976/conformance:v2.0.0-cf.1.rc.0.4.gafde435-dirty. With the following changes:

  • update REGISTRY_ORGS ?= docker.io/jbw976
  • update plugin.yaml to image: jbw976/conformance:v2.0.0-cf.1.rc.0.4.gafde435-dirty

Run conformance test with sonobuoy and the published multi-platform image:

❯ make -j2 build.all
❯ make -j2 publish BRANCH_NAME=main
❯ sonobuoy run --wait --plugin ./plugin-crossplane.yaml

Successful conformance run!

❯ sonobuoy results $(sonobuoy retrieve) -m dump
name: crossplane-conformance
status: passed
meta:
  type: summary
items:
- name: report.xml
  status: passed
...

This used to work with the old build submodule and image.mk.
With crossplane/build and imagelight.mk, we need to do the following:

- use --platform $(IMAGE_PLATFORMS) for docker buildx to build
  for all platforms
- copy all architectures of the compiled test binary to IMAGE_TEMP_DIR
- copy specific compiled conformance test binary in Dockerfile

Signed-off-by: Jared Watts <jbw976@gmail.com>

COPY --from=0 /go/bin/go-junit-report /usr/local/bin/
ADD conformance /usr/local/bin/
COPY tests/${TARGETOS}_${TARGETARCH}/tests /usr/local/bin/conformance

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbw976 jbw976 merged commit 98bd828 into crossplane:main Sep 17, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants