Repository navigation
Generalize implementation workflows for multi-buildpack repositories - #1451
Conversation
26bef38 to
7375d02
Compare
Add a multi-implementation set for repositories that package a combined buildpack plus one buildpack per component. Repositories provide a multi-implementation.json at the root describing the combined buildpack, the components, image names, and the libpak-tools command. The create-draft-release, push-buildpackage and update-dependencies workflows derive their matrices and artifact names from that file. The update-dependencies workflow also gains the warning check that jvm-vendors previously carried as a local customization, and package.sh is now generic so jvm-vendors and build-tools can share it.
7375d02 to
e93fae3
Compare
pacostas
left a comment
There was a problem hiding this comment.
I guess the main reasons that is a different implementation are:
- Not making unrelated changes accross all the paketo buidpacks as this is related only to a very few repos
- The reconsolidation, would add as a fallback the single implementation which in terms of code readability does not make it very clear
My main concern is the maintenance of having two implementations where 95% are similar, as in case of a bug in one of the implementations, the other will not get benefited from the upcoming patch
Replace the separate multi-implementation workflow set with optional behavior in the standard implementation set. Repositories opt in with a multi-implementation.json at the repo root; without it the existing single-buildpack behavior and release job are unchanged. The create-draft-release workflow now has two job graphs gated on the config file: the existing single-buildpack release job and a separate multi-buildpack path (release-prep, generate-notes, release-multi). The single path is unchanged apart from the gate and needs entries. Add scripts/.util/implementation.sh to normalize config defaults, branch package.sh for libpak-tools packaging, and make push-buildpackage run per configured buildpack. Move the update-dependencies warnings check into the shared implementation workflow.
|
Excellent catch there @pacostas. I just assumed there'd be too much difference, but turns out there really wasn't. The separate The single-buildpack Mind taking another look? |
The implementation set now supports multi-buildpack repositories via multi-implementation.json (paketo-buildpacks/github-config#1451), so jvm-vendors no longer needs a separate workflow set. Point update-github-config at the implementation set, sync the shared release/push/update-dependencies workflows and package script, and add the implementation helper. Keep the custom build.sh and CODEOWNERS repo-local.
pacostas
left a comment
There was a problem hiding this comment.
In terms of semantics, Im not really sure if the name implementation.sh gives an extra info to the developer, based on that should all the functionality of the implementation.sh be under the tools.sh and omit the implementation string from the name of each function?
Normalize multi-implementation.json into one config shape and synthesize the same shape in memory when the file is absent. This keeps default handling in the loader instead of spreading fallbacks through the individual helpers, without checking in a default config file. Also rename the multi predicate to is_multi for clarity.
Sync the shared implementation helper and workflows with the config-normalization update from paketo-buildpacks/github-config#1451.
|
Reworked the config loading so the defaults live in one place: |
repo-name is not specific to the implementation config, so move it to the shared tools utility and have implementation.sh source that file.
Sync the shared helper move from paketo-buildpacks/github-config#1451.
* Use the shared multi-implementation workflow set Describe the combined jvm-vendors buildpack, its ten vendor buildpacks and the image names in multi-implementation.json, then switch the update workflow to the new multi-implementation set in github-config. Replace the custom release, publish and update-dependencies workflows and package script with the shared versions. The workflows derive their matrices from the config file, and package.sh uses libpak-tools with the command and artifact flag from the same file. The custom build.sh stays repo-local. * Switch to the shared implementation workflow set The implementation set now supports multi-buildpack repositories via multi-implementation.json (paketo-buildpacks/github-config#1451), so jvm-vendors no longer needs a separate workflow set. Point update-github-config at the implementation set, sync the shared release/push/update-dependencies workflows and package script, and add the implementation helper. Keep the custom build.sh and CODEOWNERS repo-local. * Apply implementation config defaults when loading Sync the shared implementation helper and workflows with the config-normalization update from paketo-buildpacks/github-config#1451. * Move repo-name helper to tools.sh Sync the shared helper move from paketo-buildpacks/github-config#1451.
Problem
A few implementation repos (
jvm-vendors,build-tools) package a combined buildpack plus one buildpack per component. A separate workflow set would duplicate most ofimplementationand drift from it.What changed
Multi-buildpack support is now opt-in in the standard
implementationset. A repo adds amulti-implementation.jsonat its root describing the combined buildpack, components, images, and thelibpak-toolscommand. Without that file, behavior is unchanged.create-draft-releasehas two gated paths: the existing single-buildpack release job, and a separate multi path (release-prep->generate-notes->release-multi). The single path is unchanged apart from the gate andneeds.scripts/.util/implementation.shloads the config into one normalized shape, synthesizing single-buildpack defaults in memory when the file is absent.package.shuseslibpak-toolswhen the config exists, otherwise the existingjam/packpath.push-buildpackageruns once per configured buildpack; a single repo is a one-item matrix.has-warningscheck is now shared inupdate-dependencies-from-metadata.Verification
scripts/sanity.sh,yamllint,shellcheck, andzizmorpass;actionlintreports no workflow-expression errors.releasejob body is identical tomain.Follow-ups: switch
jvm-vendorsandbuild-toolsto theimplementationset and drop their local multi workflow copies.Note
This PR was written by opencode and reviewed by a human.