ci(gateway): add Docker Hub publish workflow (wetransform pool-loss image) - #1
Closed
morch23mj wants to merge 3 commits into
Closed
ci(gateway): add Docker Hub publish workflow (wetransform pool-loss image)#1morch23mj wants to merge 3 commits into
morch23mj wants to merge 3 commits into
Conversation
Dispatch-only workflow to build a single-arch (amd64) DocumentDB gateway image for one PG version, smoke-test it, and push to Docker Hub `wetransform/documentdb-local` (our first-party registry). Kept separate from the upstream GHCR `build_gateway.yml` so upstream merges stay clean. Requires repo secrets DOCKERHUB_USERNAME and DOCKERHUB_TOKEN on the fork. Signed-off-by: Morchid Chellali <mc@wetransform.to>
Consolidated on the 0.118 (main) engine; build ref is main after the fix merges, so the published image is wetransform/documentdb-local:0.118-poolfix. Signed-off-by: Morchid Chellali <mc@wetransform.to>
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow to support wetransform-internal, manual publishing of a single-architecture (linux/amd64) documentdb-local gateway image to Docker Hub, including a basic runtime smoke test and printing an immutable digest for pinning.
Changes:
- Introduces a
workflow_dispatch-only pipeline to build the Debian extension package, build thedocumentdb-localDocker image, and run a startup +mongoshsmoke test. - Adds optional Docker Hub login/push steps gated by an input flag, plus a post-push digest printout for deployment pinning.
Suppressed comments (2)
.github/workflows/build_push_dockerhub.yml:50
- Unquoted
${{ inputs.pg_version }}is interpolated directly into a shell command, which allows it to be parsed as additional arguments. Quote it to ensure it is treated as a single value; also pass--no-dbgsymto avoid building debug-symbol packages that this workflow never uses.
./packaging/build_packages.sh --os deb13 --pg ${{ inputs.pg_version }} --output-dir downloaded-artifacts
.github/workflows/build_push_dockerhub.yml:61
inputs.pg_versionis interpolated into thedocker buildcommand unquoted; if the value ever contains spaces it will be parsed as additional CLI args. Quote the build-arg value to keep it a single argument.
--build-arg POSTGRES_VERSION=${{ inputs.pg_version }} \
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+55
to
+57
| set -euo pipefail | ||
| DEB=$(ls downloaded-artifacts/*.deb | grep -v 'dbgsym' | head -1) | ||
| echo "Using extension package: $DEB" |
- pg_version is now a constrained choice input (15/16/17/18) instead of a free string interpolated into shell. - Bind image_tag/pg_version to env vars, referenced as $IMAGE_TAG/$PG_VERSION in run scripts, so no input is interpolated directly (script-injection safe). - Deterministic .deb selection: collect non-dbgsym packages and require exactly one, failing loudly otherwise (mirrors documentdb_local_image_build_test.yml); build with --no-dbgsym. - Login reads the secret from step env instead of the command line. Signed-off-by: Morchid Chellali <mc@wetransform.to>
Member
Author
|
Thanks — both addressed in e7ebdc8:
|
Member
Author
|
Superseded: the Docker build/publish now lives in the private wetransform/documentdb-docker repo (submodules this fork). Closing; build logic relocated there. |
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.
What
Adds
.github/workflows/build_push_dockerhub.yml— a wetransform-internal, dispatch-only workflow that builds a single-arch (amd64, our EKS node arch) DocumentDB gateway image for one PG version, smoke-tests it, and publishes it to Docker Hubwetransform/documentdb-local(our first-party registry).Kept separate from the upstream GHCR
build_gateway.yml(which builds every arch/PG combo and cosign-signs) so upstream merges stay conflict-free. Touches nothing else.Why into
mainGitHub only makes a
workflow_dispatchworkflow runnable if it exists on the default branch. This carries only the workflow file.Heads-up on merging
Merging pushes to
main, triggering one run of the upstreambuild_gateway.yml— harmless: on a plain push its push/manifest/cosign steps are gated off, so it just builds + smoke-tests and publishes nothing.After merge — publishing the patched image (0.118)
The fix and the image are consolidated on the 0.118 engine (
main). So:fix(gateway): keep last-known-good config when pg_settings read fails) intomain. Nowmainhas both the workflow and the fix.DOCKERHUB_USERNAMEandDOCKERHUB_TOKEN(push rights towetransform/).main, which now carries the fix):wetransform/documentdb-local:0.118-poolfix).🤖 Generated with Claude Code