Repository navigation
Build the release Docker images in GitHub Actions - #923
Merged
HoustonPutman merged 4 commits intoDec 2, 2026
Merged
Conversation
The release manager no longer needs personal push access to Docker Hub. Instead of building and pushing the RC and release images locally, the release wizard pushes git refs, and GitHub Actions builds the images from them: - After the local smoke test, the release commit is pushed to its own branch, rc/<version>-rc<N>, which publishes the apache/solr-operator:<version>-rc<N> image. The release commit is still not pushed to the release branch during the vote. - Once the vote passes, the release branch is fast-forwarded to that same commit, so its ID does not change, and the release tag is pushed. That publishes apache/solr-operator:<version>. The publish workflow only publishes a commit whose version.go has the release version with no suffix, only publishes a release tag whose commit is on the release branch, and never overwrites a release image. The Dockerfile now cross-compiles the binary, so the arm64 image is built on the same runner without CPU emulation. The release can be continued on a different machine. If the wizard does not know the release commit, it looks it up from the RC branch, which must be a single commit on top of the release branch, with the release commit's title and version. The RC branch can be overwritten until the vote starts. RC branches are deleted when an RC is aborted and once the release is published, which triggers a workflow that deletes their RC images from Docker Hub.
The documented CRD location, https://solr.apache.org/operator/downloads/crds/<version>/<name>.yaml, is redirected by solr-site to the crds/ folder of the official release, through closer.lua. Only v0.2.6 to v0.2.8, which predate the Apache releases, are redirected to nightlies.apache.org. So the CRDs uploaded to nightlies by the publish_crds step were never served, and the step and upload_crds.sh can go.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Uncoordinated cleanup and unrestricted RC reruns can recreate deleted images or overwrite the current candidate with stale or rebuilt content, including during voting.
5 open issues
What changed in this PR
Moves release Docker publishing to GitHub Actions, removing the release manager’s need for Docker Hub push access.
Changes:
- Adds image publication and RC-image cleanup workflows.
- Updates the wizard to manage RC branches, recover release commits, and verify published images.
- Enables cross-compilation and removes obsolete CRD uploads to nightlies.
| File | Description |
|---|---|
hack/release/wizard/releaseWizard.yaml |
Updates release steps and image verification. |
hack/release/wizard/releaseWizard.py |
Adds RC branch management and commit recovery. |
hack/release/upload/upload_crds.sh |
Removes the obsolete upload script. |
docs/modules/development/pages/release-instructions.adoc |
Documents automated image publishing. |
build/Dockerfile |
Cross-compiles binaries for target platforms. |
.github/workflows/publish-docker-image.yaml |
Builds, publishes, and verifies release images. |
.github/workflows/delete-rc-docker-image.yaml |
Deletes images for removed RC branches. |
Review effort: Balanced
…ng the publishing job' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ommit Review follow-ups for the Docker image workflows: - A new first job checks that the RC branch or release tag still points at the run's commit, and the image is only published if it does. A re-run of an old run after the RC branch was overwritten, or a queued run whose RC branch has since been deleted, now publishes nothing, rather than overwriting the current RC image. - If the image tag already exists and was built from the same commit (its org.opencontainers.image.revision label), the run only verifies it. A re-run no longer replaces an image that may be under vote with a rebuild, which is not identical. A run whose verification failed after publishing can now be re-run to finish its verification, including for a release tag. - An existing release image built from a different commit still fails the run. An RC image built from a different commit is still replaced, since the run is current, so its RC branch was overwritten. - Publishing and deleting an image share one concurrency group, keyed by the RC branch name, so an RC image can not be deleted while it is still being published and then recreated by that run.
janhoy
reviewed
Dec 2, 2026
janhoy
approved these changes
Dec 2, 2026
janhoy
left a comment
Contributor
There was a problem hiding this comment.
Let's take it for a spin.
I have a branch with my own wizard fixes that I use to drive the release, but I'll merge in this and continue from where I left.
HoustonPutman
added a commit
that referenced
this pull request
Dec 2, 2026
* Build the release Docker images in GitHub Actions The release manager no longer needs personal push access to Docker Hub. Instead of building and pushing the RC and release images locally, the release wizard pushes git refs, and GitHub Actions builds the images from them: - After the local smoke test, the release commit is pushed to its own branch, rc/<version>-rc<N>, which publishes the apache/solr-operator:<version>-rc<N> image. The release commit is still not pushed to the release branch during the vote. - Once the vote passes, the release branch is fast-forwarded to that same commit, so its ID does not change, and the release tag is pushed. That publishes apache/solr-operator:<version>. The publish workflow only publishes a commit whose version.go has the release version with no suffix, only publishes a release tag whose commit is on the release branch, and never overwrites a release image. The Dockerfile now cross-compiles the binary, so the arm64 image is built on the same runner without CPU emulation. The release can be continued on a different machine. If the wizard does not know the release commit, it looks it up from the RC branch, which must be a single commit on top of the release branch, with the release commit's title and version. The RC branch can be overwritten until the vote starts. RC branches are deleted when an RC is aborted and once the release is published, which triggers a workflow that deletes their RC images from Docker Hub. * Remove the upload of the release CRDs to nightlies The documented CRD location, https://solr.apache.org/operator/downloads/crds/<version>/<name>.yaml, is redirected by solr-site to the crds/ folder of the official release, through closer.lua. Only v0.2.6 to v0.2.8, which predate the Apache releases, are redirected to nightlies.apache.org. So the CRDs uploaded to nightlies by the publish_crds step were never served, and the step and upload_crds.sh can go. * Potential fix for pull request finding 'Skip deleted refs when starting the publishing job' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Only publish current refs, and never rebuild an image from the same commit Review follow-ups for the Docker image workflows: - A new first job checks that the RC branch or release tag still points at the run's commit, and the image is only published if it does. A re-run of an old run after the RC branch was overwritten, or a queued run whose RC branch has since been deleted, now publishes nothing, rather than overwriting the current RC image. - If the image tag already exists and was built from the same commit (its org.opencontainers.image.revision label), the run only verifies it. A re-run no longer replaces an image that may be under vote with a rebuild, which is not identical. A run whose verification failed after publishing can now be re-run to finish its verification, including for a release tag. - An existing release image built from a different commit still fails the run. An RC image built from a different commit is still replaced, since the run is current, so its RC branch was overwritten. - Publishing and deleting an image share one concurrency group, keyed by the RC branch name, so an RC image can not be deleted while it is still being published and then recreated by that run. --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


The release manager no longer needs personal push access to Docker Hub. The release wizard pushes git refs, and GitHub Actions builds and publishes the images from them.
Release flow
rc/<version>-rc<N>. The new Publish Docker Image workflow then builds and pushesapache/solr-operator:<version>-rc<N>. The release commit is still not pushed to the release branch during the vote.release-X.Yto that same commit, so its ID doesn't change, and pushes the tag. The tag triggers the same workflow, which publishesapache/solr-operator:<version>.docker buildx --pushsteps are replaced by steps that point the release manager at the workflow run and check the published image (imagetools inspect,verify_docker.sh).Publish Docker Image workflow
version/version.gohas the release version with no suffix.actions/checkout, so no new third-party actions need ASF allowlisting.build/Dockerfilenow cross-compiles the binary (FROM --platform=$BUILDPLATFORM, withTARGETOS/TARGETARCHpassed tomake). The arm64 image is built on the same runner without QEMU. The license list is unchanged, sincego-licensesis already pinned to linux/amd64.Wizard changes
rc_branchandrelease_commit_title. If the wizard doesn't knowbuild_rc.git_rev, it looks the release commit up from the RC branch the first time a template uses it. The RC branch must be a single commit on top of the release branch (or already on it, after the vote), with the release commit's title and version. The values stored are computed frombuild_rc's own vars.push_rc_branch: does nothing if the branch is already at the release commit. If it's at a different commit, it asks, then pushes with--force-with-lease. It refuses once the vote has been initiated.rc/*branch triggers the new Delete RC Docker Image workflow, which deletes the RC image from Docker Hub. That workflow can also be run manually, deletes onlyvX.Y.Z-rcNtags, and refuses while the RC branch still exists.Removed: uploading the release CRDs to nightlies
The documented CRD URL,
https://solr.apache.org/operator/downloads/crds/<version>/<name>.yaml, is redirected by solr-site (themes/solr/templates/htaccess.template) to thecrds/folder of the official release, throughcloser.lua. Only v0.2.6 to v0.2.8, which predate the Apache releases, go to nightlies. The CRDs thepublish_crdsstep uploaded to nightlies were never served, so that step andhack/release/upload/upload_crds.share removed.Before the first release that uses this
DOCKERHUB_USER/DOCKERHUB_TOKENavailable to this repo. Deleting RC images needs the token to have the Delete permission.rc/*branches is allowed. Onlymainis protected in.asf.yaml.main, sincedeleteevents run the default branch's version.Testing
push_rc_branch(create / no-op / overwrite / refuse after the vote) and the RC branch cleanup were exercised with the wizard's real functions, against a throwaway origin repo and clone.make GOOS=linux ARCH=arm64 buildproduces a static aarch64 binary.