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
The following environment variables MUST be set by the lifecycle during detect and build phases to describe the target runtime image (this information is read from analyzed.toml).
Env Variable
Description
CNB_TARGET_ID
Identifier for the target image (optional)
CNB_TARGET_OS
Target OS
CNB_TARGET_ARCH
Target architecture
CNB_TARGET_VARIANT
Target architecture variant (optional)
CNB_TARGET_DISTRO_NAME
Target OS distribution name (optional)
CNB_TARGET_DISTRO_VERISON
Target OS distribution version (optional)
If any buildpack in a group fails to declare a target in buildpack.toml matching the build-time and runtime base images, the lifecycle MUST fail detection for the group. Note that the build-time info is not known by the lifecycle and is validated by the platform.
If an (older) buildpack does not declare target data in buildpack.toml BUT it sets stacks.id = "io.buildpacks.stacks.bionic, the lifecycle will translate this to:
[[targets]]
os = "linux"
arch = "x86_64"
[[targets.distributions]]
name = "ubuntu"
versions = ["18.04"]
and use that for the validation.
The schema for analyzed.toml:
[run-image]
reference = "<image reference>"
[target]
id = "<target identifer>"
os = "<OS name>"
arch = "<architecture>"
variant = "<architecture variant>"
[target.distribution]
name = "<OS distribution name>"
version = "<OS distribution version>"
The text was updated successfully, but these errors were encountered:
natalieparellano
changed the title
[RFC #0096] Builder should provide CNB_TARGET_ID in buildpack env
[RFC #0096] Lifecycle should provide CNB_TARGET_ID in buildpack env
Jan 9, 2023
Spec PR: buildpacks/spec#336
The following environment variables MUST be set by the lifecycle during
detect
andbuild
phases to describe the target runtime image (this information is read from analyzed.toml).CNB_TARGET_ID
CNB_TARGET_OS
CNB_TARGET_ARCH
CNB_TARGET_VARIANT
CNB_TARGET_DISTRO_NAME
CNB_TARGET_DISTRO_VERISON
If any buildpack in a group fails to declare a target in
buildpack.toml
matching the build-time and runtime base images, the lifecycle MUST fail detection for the group. Note that the build-time info is not known by the lifecycle and is validated by the platform.If an (older) buildpack does not declare target data in
buildpack.toml
BUT it setsstacks.id = "io.buildpacks.stacks.bionic
, the lifecycle will translate this to:and use that for the validation.
The schema for analyzed.toml:
The text was updated successfully, but these errors were encountered: