Skip to content

Commit

Permalink
spec changes for system buildpacks
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Kutner <jpkutner@gmail.com>
  • Loading branch information
jkutner committed Feb 3, 2022
1 parent eac4899 commit 2e17f87
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions text/0000-system-buildpacks-in-builder.md
Expand Up @@ -57,8 +57,6 @@ The exit code of detection by system buildpacks MUST NOT influence the selected

System buildpacks may require/provide in the build plan following standard buildpack API specification.

A new flag to the lifecycle `detector`, `--disable-system-buildpacks`, will disable system buildpacks.

## Build

System buildpacks that have passed detection will be added to `group.toml` and treated like any other buildpack for the remainder of the build.
Expand Down Expand Up @@ -114,19 +112,28 @@ Instead of a new `[system]` table, we could put `pre` and `post` in the `[[order
# Spec. Changes (OPTIONAL)
[spec-changes]: #spec-changes

## `detector` in Platform specifiction
#### `order.toml` (TOML)

This proposal introduces a `--pre-buildpacks` and `--post-buildpacks` option on the `detector`.
```toml
[system]
[[system.pre.buildpacks]]
id = "<buildpack ID>"
version = "<buildpack version>"

[[system.post.buildpacks]]
id = "<buildpack ID>"
version = "<buildpack version>"

[[order]]
[[order.group]]
id = "<buildpack ID>"
version = "<buildpack version>"
optional = false
```
/cnb/lifecycle/detector \
[--pre-buildpacks <group>]\
[--post-buildpacks <group>]\
```

The lifecycle:

* SHALL merge the `<pre-buildpacks>` group with each group from `<order>` such that the `pre` buildpacks are placed at the beginning of each group before running detection.
* SHALL merge the `<post-buildpacks>` group with each group from `<order>` such that the `post` buildpacks are placed at the end of each group before running detection.

Where:

- Both `id` and `version` MUST be present for each buildpack object in a group.
- The value of `optional` MUST default to false if not specified.
- The lifecycle MUST add the buildpacks in `system.pre.buildpacks` to the begining of each group in the order.
- The lifecycle MUST add the buildpacks in `system.post.buildpacks` to the end of each group in the order.

0 comments on commit 2e17f87

Please sign in to comment.