Skip to content

build: fixes for make build and make publish after migrating to imagelight.mk#32

Merged
jbw976 merged 2 commits into
crossplane:mainfrom
jbw976:modernize
Sep 10, 2025
Merged

build: fixes for make build and make publish after migrating to imagelight.mk#32
jbw976 merged 2 commits into
crossplane:mainfrom
jbw976:modernize

Conversation

@jbw976

@jbw976 jbw976 commented Sep 8, 2025

Copy link
Copy Markdown
Member

In #31 we migrated to the crossplane build submodule, which only has imagelight.mk image build/publish support. Now that PR has been merged to main, and we see some CI failures for:

To fix these, this PR makes the following updates:

  • implement img.publish target, using docker buildx and BUILD_ARGS="--push"
  • set REGISTRY_ORGS variable to docker.io/crossplane
  • explicitly set tag for index.docker.io/crossplane/conformance-testdata-configuration:latest
  • bump OS base image to latest distroless/static-debian12 hash

I have tested by running the same build and publishing commands that ci.yml runs locally, with REGISTRY_ORGS temporarily set to my own docker.io/jbw976, i.e.:

  • make -j2 build.all
  • make -j2 publish BRANCH_NAME=main

Both succeed and an image is published to index.docker.io/jbw976/conformance:v1.3.0-cf.1.rc.0.29.g475a02c-dirty.

We may run into more problems in main, especially with promote, after this PR is merged, but the local testing so far looks good.

…light.mk

- implement img.publish target, using docker buildx and BUILD_ARGS="--push"
- set REGISTRY_ORGS variable to docker.io/crossplane
- explicitly set tag for index.docker.io/crossplane/conformance-testdata-configuration:latest

Signed-off-by: Jared Watts <jbw976@gmail.com>
else
img.publish:
@$(INFO) docker publish $(IMAGE)
@$(MAKE) BUILD_ARGS="--push" img.build.shared

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.

Signed-off-by: Jared Watts <jbw976@gmail.com>
Comment thread .github/workflows/ci.yml
- 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this work? 🤔 I didn't think you could tag a package as latest.

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.

it does indeed appear to work ✅

Using the same commands from ci.yml to my own jbw976 org:

crossplane xpkg build -f testdata/configuration -o conformance.xpkg
crossplane xpkg push -f conformance.xpkg index.docker.io/jbw976/conformance-testdata-configuration:latest

Looks successful with the latest tag existing on https://hub.docker.com/repository/docker/jbw976/conformance-testdata-configuration/tags/latest/sha256-9451b504ec1485dcea1d526b7b69fd0550f8579b042a2a1f004d3419ca90debf

and a docker pull works OK too:

docker pull index.docker.io/jbw976/conformance-testdata-configuration:latest
latest: Pulling from jbw976/conformance-testdata-configuration
5626454dae94: Pull complete
Digest: sha256:9451b504ec1485dcea1d526b7b69fd0550f8579b042a2a1f004d3419ca90debf
Status: Downloaded newer image for jbw976/conformance-testdata-configuration:latest
docker.io/jbw976/conformance-testdata-configuration:latest

@negz negz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not a Make expert but this looks good to me.

@jbw976 jbw976 merged commit 1b0de7d into crossplane:main Sep 10, 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