Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Builder extension spec #193

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,3 @@ Each stack ID MUST only be present once.
For a given stack, the `mixins` list MUST enumerate mixins such that no included buildpacks are missing a mixin for the stack.

Fewer stack entries as well as additional mixins for a stack entry MAY be specified.

### Builders
Buildpacks may be distributed using builders, as described in the [builder extension spec](extensions/builder.md).
28 changes: 14 additions & 14 deletions extensions/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ Builder API versions:

### File/Directories
A builder MUST have the following directories/files:
- `/cnb/order.toml` → As defined in the [platform specification][order-toml-spec]
- `/cnb/stack.toml` → As defined in the [platform specification][stack-toml-spec]
- `/cnb/lifecycle/<lifecycle binaries>` &rarr; An implementation of the lifecycle, which contains the required lifecycle binaries for [building images][lifecycle-for-build].
- `<CNB_BUILDPACKS_DIR>/order.toml` &rarr; As defined in the [platform specification][order-toml-spec]
dfreilich marked this conversation as resolved.
Show resolved Hide resolved
- `<CNB_BUILDPACKS_DIR>/stack.toml` &rarr; As defined in the [platform specification][stack-toml-spec]
dfreilich marked this conversation as resolved.
Show resolved Hide resolved
- `<CNB_BUILDPACKS_DIR>/lifecycle/<lifecycle binaries>` &rarr; An implementation of the lifecycle, which contains the required lifecycle binaries for [building images][lifecycle-for-build].
dfreilich marked this conversation as resolved.
Show resolved Hide resolved

In addition, every buildpack blob contained on a builder MUST be stored at the following file path:
- `/cnb/buildpacks/...<buildpack ID>/<buildpack version>/`
- `<CNB_BUILDPACKS_DIR>/buildpacks/...<buildpack ID>/<buildpack version>/`
dfreilich marked this conversation as resolved.
Show resolved Hide resolved

If the buildpack ID contains a `/`, it MUST be replaced with `_` in the directory name.

Expand All @@ -55,10 +55,10 @@ The following environment variables MUST be set on the builder:

The following variables MAY be set in the builder environment (through the image config's `Env` field):
dfreilich marked this conversation as resolved.
Show resolved Hide resolved

| Env Variable | Description |
| ---------------------- | -------------------------------------- |
| `SERVICE_BINDING_ROOT` | The directory where services are bound |

| Env Variable | Description | Default |
| ---------------------- | -------------------------------------- | ---- |
| `SERVICE_BINDING_ROOT` | The directory where services are bound | - |
| `CNB_BUILDPACKS_DIR` | The directory where CNB required files are | `/cnb` |
dfreilich marked this conversation as resolved.
Show resolved Hide resolved

### Labels
The following labels MUST be set in the builder environment (through the image config's `Labels` field):
dfreilich marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -81,9 +81,9 @@ The following labels MUST be set in the builder environment (through the image c
"description": "<description>",
"stack": {
"runImage": {
"image": "<run-image>",
"image": "<run image>",
"mirrors": [
"<run-image-mirror>"
"<run image mirror>"
]
}
},
Expand Down Expand Up @@ -131,8 +131,8 @@ The `createdBy` metadata is meant to contain the name and version of the tool th
{
"group": [
{
"id": "<inner-buildpack>",
"version": "<inner-buildpack version>"
"id": "<inner buildpack ID>",
"version": "<inner buildpack version>"
}
]
}
Expand All @@ -142,7 +142,7 @@ The `createdBy` metadata is meant to contain the name and version of the tool th
}
},
"<inner buildpack>": {
"<inner buildpacks version>": {
"<inner buildpack version>": {
"api": "<buildpack API>",
"stacks": [
{
Expand All @@ -151,7 +151,7 @@ The `createdBy` metadata is meant to contain the name and version of the tool th
}
],
"layerDiffID": "<diff-ID>",
dfreilich marked this conversation as resolved.
Show resolved Hide resolved
"homepage": "<buildpack-homepage>"
"homepage": "<buildpack homepage>"
}
}
}
Expand Down