HoustonPutman opened a new pull request, #923:
URL: https://github.com/apache/solr-operator/pull/923

   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:** after the local smoke test, the wizard pushes the release commit 
to its own branch, `rc/<version>-rc<N>`. The new **Publish Docker Image** 
workflow then builds and pushes `apache/solr-operator:<version>-rc<N>`. The 
release commit is still not pushed to the release branch during the vote.
   - **Release:** once the vote passes, the wizard fast-forwards `release-X.Y` 
to that same commit, so its ID doesn't change, and pushes the tag. The tag 
triggers the same workflow, which publishes `apache/solr-operator:<version>`.
   - The wizard's local `docker buildx --push` steps are replaced by steps that 
point the release manager at the workflow run and check the published image 
(`imagetools inspect`, `verify_docker.sh`).
   - The Helm OCI smoke test now runs after the release image is checked, and 
uses the release image instead of the RC image.
   
   ## Publish Docker Image workflow
   
   - Publishes only commits whose `version/version.go` has the release version 
with no suffix.
   - Publishes a release tag only if its commit is on the release branch.
   - Never overwrites a release image. An RC image is overwritten only when its 
RC branch is force-pushed, which the wizard allows only before the vote on that 
RC starts. The run summary records the digest it replaced.
   - Pulls the image back anonymously for each platform and checks the version 
and Git SHA the operator reports (on amd64; arm64 is only checked by its image 
metadata).
   - Uses only the Docker CLI and the already-pinned `actions/checkout`, so no 
new third-party actions need ASF allowlisting.
   
   `build/Dockerfile` now cross-compiles the binary (`FROM 
--platform=$BUILDPLATFORM`, with `TARGETOS`/`TARGETARCH` passed to `make`). The 
arm64 image is built on the same runner without QEMU. The license list is 
unchanged, since `go-licenses` is already pinned to linux/amd64.
   
   ## Wizard changes
   
   - **Continuing on a different machine:** new global variables `rc_branch` 
and `release_commit_title`. If the wizard doesn't know `build_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 from `build_rc`'s own vars.
   - **Re-runnable `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.
   - **Cleanup:** aborting or restarting an RC offers to delete its RC branch. 
A new publish step deletes every remaining RC branch for the release. Deleting 
an `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 only `vX.Y.Z-rcN` tags, and refuses while the RC branch still exists.
   
   ## Before the first release that uses this
   
   - [ ] ASF Infra makes `DOCKERHUB_USER` / `DOCKERHUB_TOKEN` available to this 
repo. Deleting RC images needs the token to have the *Delete* permission.
   - [ ] Check that force-pushing `rc/*` branches is allowed. Only `main` is 
protected in `.asf.yaml`.
   - [ ] Backport the publish workflow to the release branch being released. RC 
commits are built on top of it, so the workflow must be on that branch. The 
delete workflow only needs to be on `main`, since `delete` events run the 
default branch's version.
   
   ## Testing
   
   - The wizard YAML loads with the wizard's classes, and all changed templates 
render.
   - The RC-commit lookup, `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 build` produces a static aarch64 binary.
   - The ref parsing in the publish workflow accepts and rejects the expected 
branch and tag names.
   - Not run: the Docker image build itself (no Docker daemon was available), 
and both workflows against GitHub and Docker Hub. The Docker Hub tag-deletion 
API calls in particular are untested.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to