Spike for supporting buildplan configuration #124
Draft
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.
Warning
This is just an experiment. Do not merge!
Use Case
Let's say you're writing a CNB and, for the functionality your buildpack provides, you need to ensure one or more system packages are installed. Great! You can use
heroku/deb-packagesfor that! One tiny problem though, theheroku/deb-packagesCNB only supports configuration viaproject.toml. This means that your buildpack has to instruct users to manually add the required configuration for the packages it requires or it won't work. Wouldn't it be nice if your buildpack could instead just contribute the required configuration via the buildplan?Solution
This PR exposes the same configuration structure that available to end users in
project.tomlto buildpack authors in a buildplan. To leverage this configuration, a participating CNB needs to do the following in thedetectphase:heroku/deb-packagesbuildplan and provide all necessary configuration under themetadatafield.Example
detect.sh