Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC #0096] validate buildpacks' targets to based images #1301

Closed
Tracked by #219
buildpack-bot opened this issue Oct 6, 2021 · 1 comment · Fixed by #1713
Closed
Tracked by #219

[RFC #0096] validate buildpacks' targets to based images #1301

buildpack-bot opened this issue Oct 6, 2021 · 1 comment · Fixed by #1713
Assignees

Comments

@buildpack-bot
Copy link
Member

buildpack-bot commented Oct 6, 2021

Today, mixin validation is done by pack both at the time of builder creation and at build time.

For Platform API 0.12 and greater, we should replace mixin validation with target data validation. Namely,

In buildpack.toml:

[[targets]]
os = "linux"
arch = "x86_64"
[[targets.distributions]]
name = "ubuntu"
versions = ["18.04"]

In image config:

  • os
  • architecture
  • variant (if specified)
  • io.buildpacks.distribution.name label (if specified)
  • io.buildpacks.distribution.version label (if specified)

Build-time base image config should match runtime base image config. Buildpack.toml should match both of these.

If an (older) buildpack does not declare target data in buildpack.toml BUT it sets stacks.id = "io.buildpacks.stacks.bionic, pack should assume the following values:

[[targets]]
os = "linux"
arch = "x86_64"
[[targets.distributions]]
name = "ubuntu"
versions = ["18.04"]

If the build-time or runtime base is missing target data but the image contains the label io.buildpacks.stack.id with value io.buildpacks.stacks.bionic, pack should assume the following values:

  • run-image.target.os = "linux"
  • run-image.target.arch = "x86_64"
  • run-image.target.distribution.name = "ubuntu"
  • run-image.target.distribution.version = "18.04"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants