Skip to content

Commit

Permalink
Correct specification for deprecated CNB_STACK_ID
Browse files Browse the repository at this point in the history
Restores the specification for `CNB_STACK_ID` to the definition that was used prior to the docs refactor in buildpacks#335.

Fixes buildpacks#396.
Backport of buildpacks#397.

Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
  • Loading branch information
edmorley committed Mar 27, 2024
1 parent a5abeba commit 86a20a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -1570,10 +1570,13 @@ _Deprecated in Platform API 0.12._

For compatibility with older platforms and older buildpacks, base image authors SHOULD ensure for build images and run images:

- The image config's `Env` field has the environment variable `CNB_STACK_ID` set to the stack ID.
- The image config's `Label` field has the label `io.buildpacks.stack.id` set to the stack ID.
- The image config's `Label` field has the label `io.buildpacks.stack.mixins` set to a JSON array containing mixin names for each mixin applied to the image.

And for build images:

- The image config's `Env` field has the environment variable `CNB_STACK_ID` set to the stack ID.

Where `CNB_STACK_ID` SHALL be directly inherited by buildpacks without modification.

To upgrade, the platform SHOULD upgrade all buildpacks to use Buildpack API `0.10` or greater.
Expand Down

0 comments on commit 86a20a3

Please sign in to comment.