Skip to content

Commit 58fff0b

Browse files
author
Natalie Arellano
committed
Add buildpack migration guide (stub)
Signed-off-by: Natalie Arellano <[email protected]>
1 parent 88b20f4 commit 58fff0b

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
+++
2+
title="Buildpack API 0.8 -> 0.9"
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.9) for buildpack API 0.9 for the full list of changes and further details.
10+
11+
### Shell removal
12+
13+
Buildpack-defined processes may no longer implicitly rely on a shell (be non-direct).
14+
15+
In `launch.toml`, `direct` is removed as a key in the `[[processes]]` table, and all processes are inferred to be `direct = true`.
16+
17+
Buildpack processes can still use a shell! However, the `command` must now explicitly begin with `/bin/sh` (or `cmd.exe` on Windows).
18+
19+
### Overridable process arguments
20+
21+
Hand-in-hand with shell removal is the introduction of overridable process arguments.
22+
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][TODO].
24+
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).
26+
27+
### Image extensions are supported (experimental)
28+
29+
TODO

content/docs/reference/spec/migration/platform-api-0.9-0.10.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ See the [spec release](https://github.com/buildpacks/spec/releases/tag/platform%
1010

1111
## Platform Operator
1212

13-
### The `launcher` supports overridable process args
13+
### The `launcher` supports overridable process arguments
1414

1515
The way user-provided arguments are handled by the launcher depends on the buildpack API of the buildpack that created the process definition.
1616

@@ -48,7 +48,7 @@ command = ["some-command"]
4848
args = ["always-1", "always-2"]
4949
```
5050

51-
The `command` list will never have more than one entry. `always-1` and `always-2` are arguments that are always provided to `some-command`. If no user-provided arguments are specified when the application image is launched, `always-1` and `always-2` will be provided only. If user-provided arguments are specified, these will be **appended** to the `args` list. Example:
51+
The `command` list will never have more than one element. `always-1` and `always-2` are arguments that are always provided to `some-command`. If no user-provided arguments are specified when the application image is launched, `always-1` and `always-2` will be provided only. If user-provided arguments are specified, these will be **appended** to the `args` list. Example:
5252

5353
```
5454
docker run --entrypoint from-newer-buildpack my-image

0 commit comments

Comments
 (0)