buildpacks / lifecycle

Reference implementation of the Cloud Native Buildpacks lifecycle
https://buildpacks.io
Apache License 2.0
185 stars 103 forks source link

Use correct run image label name for distro name/version #1325

Closed edmorley closed 3 months ago

edmorley commented 3 months ago

Summary

The spec and docs say that the base image distro and version should be specified via the run image Docker image labels io.buildpacks.base.distro.name and io.buildpacks.base.distro.version. See: https://github.com/buildpacks/spec/blob/buildpack/v0.10/platform.md#target-data

However, until now the lifecycle implementation was checking for label names that were missing the .base substring from the name.

This causes distro name/version buildpack.toml target detection to fail, as well as the env vars CNB_TARGET_DISTRO_NAME and CNB_TARGET_DISTRO_VERSION to not be set correctly in the buildpack environment.

Release notes

The lifecycle now correctly extracts the target distro name and version from the run image labels io.buildpacks.base.distro.name and io.buildpacks.base.distro.version.

Related

Fixes #1324.