Skip to content

Commit 76e35cb

Browse files
authored
Merge branch 'main' into more-extensions
2 parents 329757a + d34f3ea commit 76e35cb

17 files changed

+316
-22
lines changed

content/docs/app-developer-guide/using-inline-buildpacks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ id = "me/rake-tasks"
2727
inline = "rake package"
2828
```
2929

30-
In this example, the `me/rake-tasks` inline buildpack is configured to run after the `example/ruby` buildpack. The inline script is compatible with buildpack API version `0.6` (this is a required field), and it will execute the `rake package` command during the build step.
30+
In this example, the `me/rake-tasks` inline buildpack is configured to run after the `example/ruby` buildpack. The inline script is compatible with Buildpack API version `0.6` (this is a required field), and it will execute the `rake package` command during the build step.
3131

3232
> **Note:** Inline buildpacks will _always_ pass detection.
3333

content/docs/extension-guide/create-extension/building-blocks-extension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You should see something akin to the following:
2626
```
2727

2828
* The `extension.toml` describes the extension, containing information such as its name, ID, and version, as well as the
29-
buildpack API that it implements. Though extensions are not buildpacks, they are expected to conform to the buildpack
29+
Buildpack API that it implements. Though extensions are not buildpacks, they are expected to conform to the Buildpack
3030
API except where noted. Consult the [spec](https://github.com/buildpacks/spec/blob/main/image_extension.md)
3131
for further details.
3232
* `./bin/detect` is invoked during the `detect` phase. It analyzes application source code to determine if the extension

content/docs/reference/spec/migration/buildpack-api-0.4-0.5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title="Buildpack API 0.4 -> 0.5"
66

77
This guide is most relevant to buildpack authors.
88

9-
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.5) for buildpack API 0.5 for the full list of changes and further details.
9+
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.5) for Buildpack API 0.5 for the full list of changes and further details.
1010

1111
### Stack ID
1212
The buildpack may now indicate compatibility with any stack by specifying the special value `*`.

content/docs/reference/spec/migration/buildpack-api-0.5-0.6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title="Buildpack API 0.5 -> 0.6"
66

77
This guide is most relevant to buildpack authors.
88

9-
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.6) for buildpack API 0.6 for the full list of changes and further details.
9+
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.6) for Buildpack API 0.6 for the full list of changes and further details.
1010

1111
### Opt-in layer caching and launch.toml format changes
1212

content/docs/reference/spec/migration/buildpack-api-0.6-0.7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title="Buildpack API 0.6 -> 0.7"
66

77
This guide is most relevant to buildpack authors.
88

9-
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.7) for buildpack API 0.7 for the full list of changes and further details.
9+
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.7) for Buildpack API 0.7 for the full list of changes and further details.
1010

1111
### New standardized SBOM format
1212

content/docs/reference/spec/migration/buildpack-api-0.7-0.8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title="Buildpack API 0.7 -> 0.8"
66

77
This guide is most relevant to buildpack authors.
88

9-
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.8) for buildpack API 0.8 for the full list of changes and further details.
9+
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.8) for Buildpack API 0.8 for the full list of changes and further details.
1010

1111
### Process-Specific Working Directory
1212

content/docs/reference/spec/migration/buildpack-api-0.8-0.9.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title="Buildpack API 0.8 -> 0.9"
66

77
This guide is most relevant to buildpack authors.
88

9-
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.9) for buildpack API 0.9 for the full list of changes and further details.
9+
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.9) for Buildpack API 0.9 for the full list of changes and further details.
1010

1111
### Shell removal
1212

@@ -20,9 +20,9 @@ Buildpack processes can still use a shell! However, the `command` must now expli
2020

2121
Hand-in-hand with shell removal is the introduction of overridable process arguments.
2222

23-
In `launch.toml`, `command` is now a list. The first element in `command` is the command, and all following entries are arguments that are always provided to the process, regardless of how the application is started. The `args` list now designates arguments that can be overridden by the end user - if supported by the platform (platform API version 0.10 and above). For further details, see the platform [migration guide](/docs/reference/spec/migration/platform-api-0.9-0.10).
23+
In `launch.toml`, `command` is now a list. The first element in `command` is the command, and all following entries are arguments that are always provided to the process, regardless of how the application is started. The `args` list now designates arguments that can be overridden by the end user - if supported by the platform (Platform API version 0.10 and above). For further details, see the platform [migration guide](/docs/reference/spec/migration/platform-api-0.9-0.10).
2424

25-
For older platforms (platform API version 0.9 and below), arguments in `args` will be appended to arguments in `command`, negating the new functionality (but preserving compatibility).
25+
For older platforms (Platform API version 0.9 and below), arguments in `args` will be appended to arguments in `command`, negating the new functionality (but preserving compatibility).
2626

2727
### Image extensions are supported (experimental)
2828

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
+++
2+
title="Buildpack API 0.9 -> 0.10"
3+
+++
4+
5+
<!--more-->
6+
7+
This guide is most relevant to buildpack authors.
8+
9+
See the [spec release](https://github.com/buildpacks/spec/releases/tag/buildpack%2Fv0.10) for Buildpack API 0.10 for the full list of changes and further details.
10+
11+
### Stacks are deprecated
12+
13+
In Buildpack 0.10, the concepts of stacks and mixins are removed
14+
in favor of existing constructs in the container image ecosystem such as operating system name, operating system distribution, and architecture.
15+
16+
#### Before build
17+
18+
`builder.toml` contains a new table for buildpacks to express the os/arch combinations that they are compatible with:
19+
20+
```toml
21+
[[targets]]
22+
os = "<OS name>"
23+
arch = "<architecture>"
24+
variant = "<architecture variant>"
25+
[[targets.distros]]
26+
name = "<OS distribution name>"
27+
version = "<OS distribution version>"
28+
```
29+
30+
All fields are optional and any missing field is assumed to "match any".
31+
32+
This information will be used by the lifecycle to skip running detect on any buildpack that is not compatible with the current os/arch.
33+
34+
Note that the `[[stacks]]` table is still supported and buildpack authors are encouraged to continue to provide this information for the time being
35+
in order to maintain compatibility with older platforms.
36+
37+
#### During build
38+
39+
The lifecycle will provide the following environment variables during `detect` and `build` to describe the target os/arch:
40+
41+
| Env Variable | Description |
42+
|-----------------------------|-------------------------------------------|
43+
| `CNB_TARGET_OS` | Target OS |
44+
| `CNB_TARGET_ARCH` | Target architecture |
45+
| `CNB_TARGET_ARCH_VARIANT` | Target architecture variant (optional) |
46+
| `CNB_TARGET_DISTRO_NAME` | Target OS distribution name (optional) |
47+
| `CNB_TARGET_DISTRO_VERISON` | Target OS distribution version (optional) |
48+
49+
Buildpacks can use this information to modify their behavior depending on the target.
50+
51+
### Run image extensions is supported (experimental)
52+
53+
In Platform 0.12, extensions can be used to extend not only build-time base images, but runtime base images as well.
54+
55+
For more information, see [authoring an image extension](/docs/extension-guide/create-extension).
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
+++
2+
title="Platform API 0.10 -> 0.11"
3+
+++
4+
5+
<!--more-->
6+
7+
This guide is most relevant to platform operators and builder authors.
8+
9+
See the [spec release](https://github.com/buildpacks/spec/releases/tag/platform%2Fv0.11) for Platform API 0.11 for the full list of changes and further details.
10+
11+
## Platform Operator
12+
13+
### SBOM files for the `launcher` are included in the application image
14+
15+
In Platform 0.11, the lifecycle ships with standardized SBOM files describing the `lifecycle` and `launcher` binaries
16+
(these are included in the tarball on the GitHub release page and within the image at `index.docker.io/buildpacksio/lifecycle:<version>`).
17+
18+
After a build, SBOM files describing the `launcher` are included in the application image at `<layers>/sbom/launch/buildpacksio_lifecycle/launcher/sbom.<ext>`,
19+
where `<ext>` is each of: `cdx.json`, `spdx.json`, and `syft.json`.
20+
Additionally, SBOM files describing the `lifecycle` are copied to `<layers>/sbom/build/buildpacksio_lifecycle/sbom.<ext>`,
21+
where they may be saved off by the platform prior to the build container exiting.
22+
23+
This mirrors what is already being done as of Platform 0.8 for buildpack-provided standardized SBOM files,
24+
which are exported to `<layers>/sbom/launch/<buildpack-id>/<layer>/sbom.<ext>` (for runtime dependencies)
25+
and copied to `<layers>/sbom/launch/<buildpack-id>/sbom.<ext>` (for build-time dependencies).
26+
27+
To use this feature, no additional action is required from platforms that are already handling buildpack-provided SBOM files.
28+
The SBOMs for the image will simply be more complete.
29+
30+
### The rebaser accepts a -previous-image flag to allow rebasing by digest reference
31+
32+
Previously, when rebasing an image, the rebased image would always be saved to the same tag as the original image.
33+
This prevented rebasing by digest, among other use cases.
34+
35+
In Platform 0.11, the original image may be specified separately from the destination image with the `previous-image` flag, as in the following:
36+
37+
```bash
38+
/cnb/lifecycle/rebaser -previous-image some-original-image some-destination-image
39+
```
40+
41+
As before, additional tags for the destination image can also be provided:
42+
43+
```bash
44+
/cnb/lifecycle/rebaser -previous-image some-original-image -tag some-additional-tag:latest some-destination-image
45+
```
46+
47+
To use this feature, platforms can provide the new `-previous-image` flag to the `rebaser`.
48+
49+
## Builder Author
50+
51+
### Platforms can specify build time environment variables
52+
53+
Builders can include a `/cnb/build-config/env/` directory to define environment variables for buildpacks.
54+
55+
As an example, file `/cnb/build-config/env/SOME_VAR` with contents `some-val` will become `SOME_VAR=some-val` in the buildpack environment.
56+
57+
Files in the `/cnb/build-config/env/` directory can use suffixes to control the behavior when another entity defines the same variable -
58+
e.g., if `/cnb/build-config/env/SOME_VAR.override` has contents `some-builder-val` and `<platform>/env/SOME_VAR` has contents `some-user-val`,
59+
the buildpack environment will contain `SOME_VAR=some-builder-val`.
60+
This is similar to the [environment modification rules for buildpacks](https://github.com/buildpacks/spec/blob/main/buildpack.md#environment-variable-modification-rules),
61+
except that the default behavior when no file suffix is provided is `default`.
62+
63+
The order of application for env directories is:
64+
* Buildpack: `<layers>/<buildpack-id>/<layer>/<env>/`
65+
* User: `<platform>/env/` - overrides buildpack values
66+
* Builder: `/cnb/build-config/env/`
67+
68+
For additional information, see the [buildpack environment](https://github.com/buildpacks/spec/blob/main/platform.md#buildpack-environment) section in the Platform spec.
69+
70+
To use this feature, builder authors should include a `/cnb/build-config/env/` directory with the desired configuration.

0 commit comments

Comments
 (0)