feat: build one image per application, not one per project - #2
Merged
Conversation
A project generated with both a web and an api application published exactly one image: whichever the toolbox applied last. The other app passed CI and then vanished — never built, never pushed, never in the compose file a client runs. It was the shape the wizard offers first. app-build.yml and app-release.yml now take an `images` array and matrix over it. release-please and the release assets still run once, which is why the fan-out has to live here rather than in the generated call site: calling app-release.yml per application would cut a release per application. The singular image/context/dockerfile inputs stay, resolved into the same matrix by app-targets.yml, so a project generated before this keeps working at v1 with no edit.
`scaffold new demo` with no adapter generates a project that publishes nothing. Under the previous validation its Build workflow failed on every push until somebody added an application.
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
app-build.ymlandapp-release.ymltake animagesarray ({image, context, dockerfile}per application) and matrix over it. A newapp-targets.ymlresolves the input into that matrix so both workflows read the same list.Why
A project generated with both a web and an api application published exactly one image — whichever the toolbox applied last. The other app passed CI and then vanished: never built, never pushed, never in the
compose.yamla client runs. That is the shape the scaffold wizard offers first.The fan-out has to live here rather than in the generated call site:
app-release.ymlrunsrelease-pleaseand uploads the release assets, both of which must happen once. Calling it per application would cut a release per application.Compatibility
The singular
image/context/dockerfileinputs stay and resolve into the same matrix, so every project generated before this keeps working atv1with no edit. Passing both shapes is refused rather than silently preferring one.Build cache is now scoped per image so two applications in one run do not evict each other's layers.