You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: buildpacks/release-phase/README.md
+62-10Lines changed: 62 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,10 @@ schema-version = "0.2"
14
14
uri = "heroku/release-phase"
15
15
```
16
16
17
-
### Release Build command
18
-
19
-
```toml
20
-
[com.heroku.phase.release-build]
21
-
command = "bash"
22
-
args = ["-c", "npm build"]
23
-
```
24
-
25
-
This command must output release artifacts into `/workspace/static-artifacts/`. The content of this directory will be stored during Release Phase by the `RELEASE_ID`, and then automatically retrieved for `web` processes, during start-up.
26
-
27
17
### Release commands
28
18
19
+
*Multiple `release` commands are supported as a TOML array, their entries declared by `[[…]]`.*
These commands are ephemeral. No changes to the filesystem are persisted.
40
32
33
+
### Release Build command
34
+
35
+
*Only a single `release-build` command is supported. The entry must be declared with `[…]`.*
36
+
37
+
```toml
38
+
[com.heroku.phase.release-build]
39
+
command = "bash"
40
+
args = ["-c", "npm build"]
41
+
```
42
+
43
+
This command must output release artifacts into `/workspace/static-artifacts/`. The content of this directory will be stored during Release Phase by the `RELEASE_ID`, and then automatically retrieved for `web` processes, during start-up.
44
+
41
45
## Configuration: runtime environment vars
42
46
43
47
### `RELEASE_ID`
@@ -66,4 +70,52 @@ Artifacts are stored at the `STATIC_ARTIFACTS_URL` with the name `release-<RELEA
66
70
67
71
**Required for `s3` URLs.** The access secret.
68
72
73
+
## Inherited Configuration
74
+
75
+
Other buildpacks can return a [Build Plan](https://github.com/buildpacks/spec/blob/main/buildpack.md#build-plan-toml) from `detect` for Release Phase configuration.
76
+
77
+
The array of `release` commands defined in an app's `project.toml` and the inherited Build Plan are combined into a sequence:
78
+
1.`release` commands inherited from the Build Plan
79
+
2.`release` commands declared in `project.toml`.
80
+
81
+
Only a single `release-build` command will be executed during Release Phase:
82
+
* the `release-build` command declared in `project.toml` takes precedence
83
+
* otherwise `release-build` inherited from Build Plan
84
+
* if multiple Build Plan entries declare `release-build`, the last one takes precedence.
85
+
86
+
This example sets a `release` & `release-build` commands in the build plan, using the supported [project configuration](#configuration-projecttoml):
69
87
88
+
```toml
89
+
[[requires]]
90
+
name = "release-phase"
91
+
92
+
[requires.metadata.release-build]
93
+
command = "bash"
94
+
args = ["-c", "npm run build"]
95
+
source = "My Awesome Buildpack"
96
+
97
+
[[requires.metadata.release]]
98
+
command = "bash"
99
+
args = ["-c", "echo 'Hello world!'"]
100
+
source = "My Awesome Buildpack"
101
+
```
102
+
103
+
Example using [libcnb.rs](https://github.com/heroku/libcnb.rs):
0 commit comments