Skip to content

Add add workflow hook examples for build-and-push workflow#32

Merged
grahamalama merged 16 commits into
mainfrom
go-demo-compose
Oct 20, 2025
Merged

Add add workflow hook examples for build-and-push workflow#32
grahamalama merged 16 commits into
mainfrom
go-demo-compose

Conversation

@grahamalama
Copy link
Copy Markdown
Contributor

In this PR, we're starting to experiment with what kinds of patterns we want to suggest or standardize as a part of the paved path for building and publishing Docker containers. These are the aspects that we'll want to highlight and provide documentation for in Confluence:

  • adding a HEALTHCHECK instruction to the Dockerfile

  • adding a Makefile with these targets that we expect the build-and-push workflow to call:

    • make mozcloud-prebuild
    • make mozcloud-postbuild
  • the kinds of checks and tasks to run in these {pre,post}build commands

    • I suspect that prebuild will look pretty similar in most services, and that's something we can provide as a sensible default
    • postbuild will most likely be more unique to each service. We can highlight important aspects of what to run in this step, though

This PR uses docker compose as the way we build containers and run tests. This is because many teams use both Make and Docker Compose to orchestrate local development tasks like building and running tests. Though we'll still want teams to eventually use our actions since they'll offer an easy way to build containers the right way (proper tagging, build attestations, etc), we still want to offer suggestions on how to make local workflows the most compatible with our actions and reusable CI workflows.

Comment thread .github/workflows/mozcloud-publish.yaml
Comment thread go-demo/scripts/build-version Outdated
Comment thread go-demo/Dockerfile Outdated
Comment thread go-demo/compose.yaml Outdated
Comment thread go-demo/scripts/verify-container Outdated
Comment thread go-demo/Makefile Outdated
@grahamalama grahamalama force-pushed the go-demo-compose branch 2 times, most recently from b729efe to 857a150 Compare October 17, 2025 18:38
@grahamalama grahamalama requested a review from dlactin October 20, 2025 15:18
@grahamalama grahamalama merged commit 45454ec into main Oct 20, 2025
2 checks passed
@grahamalama grahamalama deleted the go-demo-compose branch October 30, 2025 16:47
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