Compare commits

...

192 Commits

Author SHA1 Message Date
Natalie Arellano d29ba81518
Merge pull request #413 from devigned/fix-image-ex-typo
fix typo to image extension link
2025-02-24 11:46:23 -05:00
David Justice bdcac26a7d
fix typo to image extension link
Signed-off-by: David Justice <david@devigned.com>
2024-12-09 14:55:38 -05:00
Natalie Arellano f3fd7555c8
Merge pull request #410 from buildpacks/platform/0.14
Finalize Platform 0.14
2024-07-17 09:48:52 -04:00
Natalie Arellano f8b60dc65c Update version
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2024-07-09 12:36:55 -04:00
Natalie Arellano 08ee76ee4b
Merge pull request #408 from sap-contributions/add-run-flag-restorer
Add `-run` flag to the `restorer` binary
2024-07-09 12:33:20 -04:00
Pavel Busko 7f44395c97 clarify run image resolution during restore phase
Signed-off-by: Pavel Busko <pavel.busko@sap.com>
2024-07-04 12:30:56 +02:00
Pavel Busko 664e7a0eb3 Add -run flag to the restorer binary
Signed-off-by: Pavel Busko <pavel.busko@sap.com>
2024-07-03 12:32:39 +02:00
Natalie Arellano 7207c7dd71
Merge pull request #405 from ryanbrainard/patch-1
Close code fence
2024-04-19 09:53:47 -04:00
Ryan Brainard c995c549f7
Close code fence
Add closing backtick of code fence to fix rendering

Signed-off-by: Ryan Brainard <966764+ryanbrainard@users.noreply.github.com>
2024-04-18 10:20:47 -04:00
Natalie Arellano b341177441
Merge pull request #402 from edmorley/fix-distros.version-field-name
Correct name of `distros.version` field in `buildpack.toml`
2024-04-09 09:28:02 -04:00
Ed Morley 7c68e77461
Correct name of `distros.version` field in `buildpack.toml`
The correct name for the field is `distros.version` (singular), rather than
`distros.versions`.

The former is what is used elsewhere in the spec, and in the lifecycle
implementation.

The plural form looks like a leftover from the rename in:
8652ec5e49

Fixes #401.

Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
2024-04-08 16:15:33 +01:00
Natalie Arellano 87dc65b961
Merge pull request #397 from edmorley/patch-1
Correct specification for deprecated `CNB_STACK_ID`
2024-03-27 15:52:27 -04:00
Ed Morley 551833d3d1
Correct specification for deprecated `CNB_STACK_ID`
Restores the specification for `CNB_STACK_ID` to the definition that was used prior to the docs refactor in #335.

Fixes #396.

Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
2024-03-27 16:39:42 +00:00
Natalie Arellano bd040abaf6
Merge pull request #392 from buildpacks/platform/0.13
Finalize Platform/0.13
2024-03-05 15:52:46 -05:00
Natalie Arellano a5abebae3f
Merge branch 'main' into platform/0.13 2024-03-05 13:04:21 -05:00
Natalie Arellano 0389b50d7b
Merge pull request #393 from buildpacks/buildpack/0.11
Finalize Buildpack/0.11
2024-03-05 13:04:03 -05:00
Natalie Arellano f56c8db7bb
Merge branch 'main' into buildpack/0.11 2024-03-05 11:21:52 -05:00
Natalie Arellano 15ddfc8027
Merge branch 'main' into platform/0.13 2024-03-05 11:21:14 -05:00
Natalie Arellano a762860c1e
Merge pull request #394 from buildpacks/buildpack/v0.11
Combine Buildpack/v0.11 branches
2024-03-05 11:20:43 -05:00
Natalie Arellano b2fd486066
Merge pull request #385 from buildpacks/insecure-registries
Add insecure registries flags and env var
2024-03-04 12:42:45 -05:00
Natalie Arellano 845d862394 Merge branch 'platform/0.13' into insecure-registries 2024-03-04 12:42:11 -05:00
Natalie Arellano cc0925b862
Merge pull request #387 from loewenstein/extensions-buildpack
Remove `experimental` mark on extensions
2024-03-01 09:42:01 -05:00
Natalie Arellano 2ff96c2b34
Merge pull request #377 from buildpacks/remove-glue
Remove backwards compatible glue for unsupported buildpack API 0.2
2024-03-01 09:41:46 -05:00
Natalie Arellano 296f8becfb
Merge pull request #386 from loewenstein/extensions-platform
Remove `experimental` mark on extensions
2024-03-01 09:40:53 -05:00
Natalie Arellano 347a977e79
Merge pull request #380 from kritkasahni-google/main
Platform API changes to enable exporting app image and cache image in parallel
2024-03-01 09:40:36 -05:00
Natalie Arellano 29d53ac429
Merge pull request #390 from thiunuwan/patch-1
Update buildpack.md
2024-03-01 09:40:01 -05:00
Ravindu Thiunuwan d13cf5f53e
Update buildpack.md
Signed-off-by: Ravindu Thiunuwan <83197833+thiunuwan@users.noreply.github.com>
2024-03-01 10:18:38 +05:30
Jan von Löwenstein ae39fb0367 Remove `experimental` mark on extensions
Signed-off-by: Jan von Löwenstein <jan.von.loewenstein@sap.com>
2024-02-05 18:16:54 +00:00
Jan von Löwenstein 88050e72d5 Remove `experimental` mark on extensions
Signed-off-by: Jan von Löwenstein <jan.von.loewenstein@sap.com>
2024-02-05 18:16:21 +00:00
Natalie Arellano e7f547c3c0
Merge pull request #383 from sap-contributions/extension-contexts-extension-md
Changes for image extension build contexts
2024-02-01 13:03:22 -05:00
Natalie Arellano f4778c7805
Merge pull request #384 from sap-contributions/extension-contexts-platform-md
Platform API changes for image extension build contexts
2024-02-01 13:03:14 -05:00
Natalie Arellano 334893105d Add insecure registries flags and env var
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2024-01-17 15:00:51 -05:00
Ralf Pannemans 3bb19203e3 Add recoring of build-image.extend
Signed-off-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
2024-01-09 13:09:03 +01:00
Ralf Pannemans b19fdbdaa8 Platform API changes for image extension build contexts
Signed-off-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2024-01-09 12:52:18 +01:00
Ralf Pannemans 43c7cd9950 Changes for image extension build contexts
Signed-off-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2024-01-09 12:47:48 +01:00
Natalie Arellano 36695bacab
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-11-15 10:48:22 -05:00
kritka sahni cd8843b8b4 Platform API changes to enable exporting app image and cache image in parallel
Signed-off-by: kritka sahni <kritkasahni@google.com>
2023-11-15 05:07:28 +00:00
Natalie Arellano 0f5d7f2332 Remove backwards compatible glue for unsupported buildpack API 0.2
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-08-23 15:02:47 -04:00
Natalie Arellano 7eb38d15fd
Merge pull request #371 from buildpacks/platform/0.12
Finalize Platform 0.12
2023-08-03 13:57:30 -04:00
Natalie Arellano 077230d06e
Merge branch 'main' into platform/0.12 2023-08-03 13:57:02 -04:00
Natalie Arellano e1c08bf85e
Merge pull request #376 from buildpacks/buildpack/0.10
Finalize Buildpack 0.10 (again)
2023-08-03 13:56:43 -04:00
Natalie Arellano a641ca1302
Merge pull request #375 from buildpacks/remove-target-id-from-lifecycle
Remove `target.id` from the lifecycle
2023-08-03 12:14:34 -04:00
Natalie Arellano 50be8f2111
Merge branch 'main' into buildpack/0.10 2023-08-03 12:13:57 -04:00
Natalie Arellano 0bfa2477d6
Merge pull request #374 from buildpacks/remove-target-id
Remove CNB_TARGET_ID from the Buildpack API
2023-08-03 12:13:17 -04:00
Natalie Arellano 2d58de770b Remove `target.id` from the lifecycle
Base images may still express this identifier as a label,
but it will not be used by the lifecycle nor provided to buildpacks.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-08-03 11:49:54 -04:00
Natalie Arellano 6acf1a3a83 Remove CNB_TARGET_ID from the Buildpack API
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-08-03 11:45:58 -04:00
Natalie Arellano 8e1cab2deb
Merge pull request #373 from buildpacks/buildpack/0.10
Fix typo in the buildpack spec
2023-08-02 15:46:04 -04:00
Natalie Arellano 93d7824177
Merge pull request #372 from buildpacks/fix/typo
Fix typo in the buildpack spec
2023-08-02 15:45:15 -04:00
Natalie Arellano 9e95588c38 Fix typo in the buildpack spec
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-08-02 11:15:43 -04:00
Natalie Arellano 3324444812
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-08-02 10:02:53 -04:00
Natalie Arellano 6738424280 Merge branch 'main' into platform/0.12 2023-08-01 13:05:50 -04:00
Natalie Arellano a65feb79c3
Merge pull request #367 from buildpacks/fix/platform-vars
Fix: platform vars
2023-08-01 12:56:13 -04:00
Natalie Arellano 73cd163308 Merge branch 'platform/0.12' into fix/platform-vars 2023-08-01 12:41:36 -04:00
Natalie Arellano 42c59ca68d
Merge pull request #347 from buildpacks/run-image-extension/platform
Platform API changes for run image extension (Dockerfiles phase 3)
2023-08-01 12:37:54 -04:00
Natalie Arellano e6f047ed95
Merge pull request #335 from buildpacks/stack-removal/platform
Stack removal: platform changes
2023-08-01 11:57:00 -04:00
Natalie Arellano ce7b1f8066 Merge branch 'stack-removal/platform' into run-image-extension/platform 2023-08-01 10:18:52 -04:00
Natalie Arellano e7ac2228c8 Merge branch 'platform/0.12' into stack-removal/platform 2023-08-01 10:15:33 -04:00
Natalie Arellano 9f8a0fbe0d
Merge pull request #352 from jjbustamante/enhancement/issue-327-image-in-oci-layout-format
OCI layout spec changes
2023-08-01 10:08:30 -04:00
Natalie Arellano 134bdde60b Fix
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-08-01 10:06:00 -04:00
Natalie Arellano 4e63c2763b
Merge pull request #365 from buildpacks/buildpack/0.10
Finalize Buildpack/0.10
2023-07-31 15:30:58 -04:00
Natalie Arellano a133f824e7 Merge branch 'stack-removal/platform' into run-image-extension/platform 2023-07-31 10:12:12 -04:00
Natalie Arellano 85819652ea Add -daemon to restorer
This is needed when extensions were used to switch (but not extend) the run image
and we need to re-read the target data from the image config.

In such cases, we don't need the run image to exist in a registry,
because we don't need a manifest for kaniko.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-31 10:09:31 -04:00
Natalie Arellano bc1e7535a8 Add further guidance about target ID
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-31 10:03:03 -04:00
Sambhav Kothari f1ff20b6c6
Merge pull request #370 from buildpacks/fix/distribution-to-distro
Buildpack spec: rename distribution to distro
2023-07-28 22:53:46 +01:00
Sambhav Kothari d3b6f14a97
Merge pull request #369 from buildpacks/fix/optional-os-arch
Buildpack spec: clarify target requirements and matching logic
2023-07-28 22:53:20 +01:00
Sambhav Kothari bae7ccd319
Merge pull request #366 from BarDweller/main
Allow metadata for extension.toml
2023-07-28 22:52:33 +01:00
Natalie Arellano 4f4aa24be5 Update definition
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-28 10:20:22 -04:00
Natalie Arellano ea0bcde72f Update more label names
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-28 10:16:54 -04:00
Natalie Arellano d6db12261e
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-28 10:14:54 -04:00
Natalie Arellano a1512afa20 Rename distributions -> distros to match platform spec
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-28 10:09:53 -04:00
Natalie Arellano 92146ab4f9 Clarify target requirements and matching logic
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-28 10:03:59 -04:00
Natalie Arellano b4f953901c
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-24 16:37:56 -04:00
Natalie Arellano 5feb0b5206 Fix: platform-defined env vars are not actually overridable by buildpacks
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-24 13:19:08 -04:00
Natalie Arellano aec9203a46
Apply suggestions from code review
Co-authored-by: Terence Lee <hone02@gmail.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-24 13:03:36 -04:00
Natalie Arellano b0ccf7c48b
Merge branch 'stack-removal/platform' into run-image-extension/platform
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-24 12:49:59 -04:00
Natalie Arellano 92669c592c
Merge branch 'buildpack/0.10' into main
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-24 12:44:04 -04:00
Ozzy Osborne 053e59acf4 allow metadata for extension.toml
Signed-off-by: Ozzy Osborne <bardweller@gmail.com>
2023-07-17 15:23:28 -04:00
Natalie Arellano c0e281280b Specify the correct Buildpack API version
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-13 11:56:25 -04:00
Natalie Arellano 4704d14a66 Really fix modification of platform.md in this branch
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-13 11:53:04 -04:00
Natalie Arellano cbf43c7257 Revert "Merge branch 'main' into buildpack/0.10"
This reverts commit 26f60e3a20, reversing
changes made to e16c633fd0.
2023-07-13 11:49:46 -04:00
Natalie Arellano bf7d412cdb Fix modification of platform.md in this branch
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-13 11:33:59 -04:00
Natalie Arellano 26f60e3a20 Merge branch 'main' into buildpack/0.10 2023-07-13 11:31:46 -04:00
Natalie Arellano e16c633fd0
Merge pull request #336 from buildpacks/stack-removal/buildpack
Stack removal: buildpack changes
2023-07-13 11:28:36 -04:00
Natalie Arellano 7fd95e8a14
Update buildpack.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-12 17:37:35 -04:00
Natalie Arellano db802b2645
Apply suggestions from code review
Co-authored-by: Sambhav Kothari <skothari44@bloomberg.net>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-12 17:33:00 -04:00
Natalie Arellano c6dd08c7ab Clarify run image selection
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-06 11:11:17 -04:00
Natalie Arellano 3deb450694 Update analyzed.toml description
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-05 17:00:10 -04:00
Natalie Arellano 5f0936c003 Rebaser: update -force cases
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-07-05 10:31:32 -04:00
Natalie Arellano 910c3de050
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-14 13:55:57 -04:00
Natalie Arellano a05c4410f0
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-13 13:24:27 -04:00
Natalie Arellano 2caf4d6413 Update labels to update during rebase
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-13 13:10:43 -04:00
Natalie Arellano 22ceb7f910
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-13 13:07:42 -04:00
Natalie Arellano 5b7eadeb51 Clarify target matching
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-06 11:07:43 -04:00
Natalie Arellano 9587e8cd4b
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-06 11:05:26 -04:00
Natalie Arellano f2b87a29c1 Wording
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-06 11:03:32 -04:00
Natalie Arellano a2d78bb626 Add more information in deprecations
Also update table of contents

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-06 11:00:16 -04:00
Natalie Arellano 058949f58c Extensions specify targets
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-05 13:13:48 -04:00
Natalie Arellano 00cecc280f
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-05 13:08:27 -04:00
Natalie Arellano 9741479b7f Add when labels were deprecated
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-05 13:01:32 -04:00
Natalie Arellano 2e06dd6c3b Add more deprecations
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-05 13:00:38 -04:00
Natalie Arellano a29f7fea62
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-05 12:57:28 -04:00
Natalie Arellano 31dd9c3c94 `stack` key is deprecated.
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-05 12:35:14 -04:00
Natalie Arellano d11f06c5de Merge branch 'stack-removal/platform' into run-image-extension/platform 2023-06-05 11:13:04 -04:00
Natalie Arellano 5f931eba5e Merge branch 'platform/0.12' into stack-removal/platform 2023-06-05 11:03:05 -04:00
Natalie Arellano 1fe9fd48af Added -analyzed to builder
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-05 10:41:15 -04:00
Natalie Arellano 46dc116a3b
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-05 10:40:51 -04:00
Natalie Arellano 8f6c0282cc
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-06-05 10:34:32 -04:00
Natalie Arellano e41fd672c8
Merge pull request #360 from hernandanielg/platform-output-update-stack
add lifecycle output to update stack after rebase
2023-05-31 17:37:36 -04:00
Natalie Arellano 32be97287f
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-05-31 17:37:12 -04:00
Hernan Garcia 8422bfedfd
Update platform.md
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Hernan Garcia <hernandanielg@gmail.com>
2023-05-23 11:44:25 -05:00
Natalie Arellano fb093a37ff
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-05-23 12:18:11 -04:00
Hernan Garcia d44ea666ac
Merge branch 'stack-removal/platform' into platform-output-update-stack
Signed-off-by: Hernan Garcia <hernandanielg@gmail.com>
2023-05-22 17:32:14 -05:00
Hernan Garcia c05b08eefc
Update platform.md
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Hernan Garcia <hernandanielg@gmail.com>
2023-05-16 09:38:34 -05:00
Hernan Garcia 417b853eba add lifecycle output to update stack after rebase
Signed-off-by: Hernan Garcia <hernan.garcia@percona.com>
2023-05-15 14:26:19 -05:00
Natalie Arellano 02112bcff8
Merge pull request #357 from sap-contributions/enhance-run-image-resolution
Enhanced run image resolution
2023-05-08 11:25:51 -04:00
Joe Kutner 83ce49fb34
Merge pull request #359 from joe-kimmel-vmw/fix-image-extension-link
fixes link to image extension md file
2023-04-08 14:29:30 -05:00
Joe Kimmel 56a6557701 fixes link to image extension md file
Signed-off-by: Joe Kimmel <jkimmel@vmware.com>
2023-04-08 11:38:53 -07:00
Juan Bustamante 24b950d6e8
reviewing and making some fix before undraft the PR
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2023-03-27 15:41:22 -05:00
Juan Bustamante 9a967d2c8a
adding -layout-dir flag
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2023-03-27 15:41:22 -05:00
Juan Bustamante f8c5409746
adding -layout-dir flag
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2023-03-27 15:41:22 -05:00
Juan Bustamante c8d3936aa1
Apply suggestions from code review
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2023-03-27 15:40:54 -05:00
Juan Bustamante e22d523b7b
Draft of the OCI layout spec changes
Signed-off-by: Juan Bustamante <jbustamante@vmware.com>
2023-03-27 15:39:43 -05:00
Natalie Arellano 77ab37b499
Update buildpack.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-20 16:56:17 -04:00
Johannes Dillmann d3069b8611 Apply feedback on run image resolution
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Signed-off-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-03-14 13:24:11 +01:00
Natalie Arellano 7bec2312dc
Update buildpack.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 14:33:51 -05:00
Natalie Arellano b127b3da70 Merge branch 'buildpack/0.10' into stack-removal/buildpack 2023-03-03 14:33:24 -05:00
Natalie Arellano 8652ec5e49 Distribution can have only one version
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 14:31:17 -05:00
Natalie Arellano c985eeb170 Clarify matching criteria
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 14:29:14 -05:00
Natalie Arellano c0cf852657
Update buildpack.md
Co-authored-by: Terence Lee <hone02@gmail.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 14:20:04 -05:00
Natalie Arellano 1d39e567a9
Update buildpack.md
Co-authored-by: Terence Lee <hone02@gmail.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 14:19:47 -05:00
Natalie Arellano 8efb92a3ff
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 12:31:25 -05:00
Natalie Arellano 381ee53903 Add back base image
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 12:28:49 -05:00
Natalie Arellano c5d1691831 Merge branch 'platform/0.12' into stack-removal/platform 2023-03-03 12:25:59 -05:00
Natalie Arellano 1b0ea79c19 Init platform 0.12
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 12:18:47 -05:00
Natalie Arellano 9957239f0a Define base image and update TOC
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 12:16:42 -05:00
Natalie Arellano 7822f9a3d1
Update platform.md
Co-authored-by: Terence Lee <hone02@gmail.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-03 11:59:25 -05:00
Natalie Arellano 8a5929f3e5 Rename image -> images
In lists we pluralize

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-02 16:11:04 -05:00
Natalie Arellano 905754ee57 Rename image -> images
In lists we pluralize

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-03-02 16:09:52 -05:00
Pavel Busko 538e1d0ca8 Enhanced run image resolution
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Signed-off-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-03-01 17:08:37 +01:00
Natalie Arellano 4de1087877 Detector doesn't need run without run image extension
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-02-16 13:13:43 -05:00
Natalie Arellano 7c905e171b Rename stack -> run
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-02-16 13:11:46 -05:00
Natalie Arellano 4480ba7997 Rename stack.toml to run.toml and validate run image selection against run.toml
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-02-16 13:10:53 -05:00
Natalie Arellano 5e9784721a
Merge pull request #354 from buildpacks/platform/0.11
Finalize platform/0.11
2023-02-09 12:50:12 -05:00
Natalie Arellano 1947260dfc Alphabetize inputs
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-02-09 12:49:04 -05:00
Natalie Arellano 9828bf3cb4
Apply suggestions from code review
Co-authored-by: Joe Kutner <jpkutner@gmail.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-02-08 16:38:40 -05:00
Sambhav Kothari 4cacf53062
Merge pull request #353 from buildpacks/run-image-extension/buildpack
Buildpack API changes for run image extension (Dockerfiles phase 3)
2023-02-07 23:16:27 +00:00
Sambhav Kothari 80731d259d
Merge pull request #346 from buildpacks/jab/262-spec-update
Add `<previous-image>` to rebaser
2023-02-07 23:14:04 +00:00
Sambhav Kothari a79c895d63
Merge pull request #345 from buildpacks/rfc-109-env-build
Define CNB_BUILD_CONFIG_DIR behavior
2023-02-07 23:13:28 +00:00
Sambhav Kothari f074ff25b1
Apply suggestions from code review
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Sambhav Kothari <sambhavs.email@gmail.com>
2023-02-07 23:12:45 +00:00
Natalie Arellano b5e07386d8 Add run image extension to buildpack spec as per RFC 0105
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-02-07 13:59:15 -05:00
Sambhav Kothari 4eb5f02e13
Apply suggestions from code review
Signed-off-by: Sambhav Kothari <sambhavs.email@gmail.com>
2023-02-04 13:51:41 +00:00
Sambhav Kothari 9f5a417bf5
Merge pull request #349 from buildpacks/rfc-109-env-build-buildpack
Define CNB_BUILD_CONFIG_DIR buildpack behavior
2023-02-04 13:47:45 +00:00
Aidan Delaney 4cff1db694 Provide changes to platform.md only
Revert changes to buildpack.md so that platform.md can be merged into
appropriate branches.

Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
2023-02-04 08:05:53 +00:00
Aidan Delaney f4424e9851 Describe Operator provided vars in CNB_BUILD_CONFIG_DIR
Describe how CNB_BUILD_CONFIG_DIR variables MUST be provided in the
lifecycle execution environment and the suffixes that are allowed.

Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
2023-02-04 08:05:53 +00:00
Aidan Delaney 67b286d027 Provide changes to buildpack.md only
Revert changes to platform.md so that buildpack.md can be merged into
appropriate branches.

Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
2023-02-04 08:02:32 +00:00
Aidan Delaney 3e227b5bd4 Describe Operator provided vars in CNB_BUILD_CONFIG_DIR
Describe how CNB_BUILD_CONFIG_DIR variables MUST be provided in the
lifecycle execution environment and the suffixes that are allowed.

Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
2023-02-04 08:02:32 +00:00
Natalie Arellano 796133ad32
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-02-02 18:06:27 -05:00
Natalie Arellano ef56944eb5 Rename stack.toml to run.toml and validate run image selection against run.toml
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-02-02 17:38:29 -05:00
Natalie Arellano 156a8124db Add run image extension to platform spec as per RFC 0105
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2023-02-02 16:55:15 -05:00
Jesse Brown f1971a0e8e
Add `<previous-image>` to rebaser
Handles https://github.com/buildpacks/rfcs/pull/262

Signed-off-by: Jesse Brown <jabrown85@gmail.com>

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
2023-01-23 14:10:21 -06:00
Aidan Delaney 2c5a8057c9 Define CNB_BUILD_CONFIG_DIR behavior
RFC #109 defines a directory allowing operators to set environment
variables for detect and build phases.  Specify how the buildpack
phases should implement the behavior.

Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
2023-01-17 06:04:40 +00:00
Natalie Arellano 64d392cc34 More rename platform -> target
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 12:18:00 -05:00
Natalie Arellano b3c883b241 Rename distro -> distribution and update schema of analyzed.toml to match buildpack spec
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 12:14:59 -05:00
Natalie Arellano f865cb0057 Rename distros -> distributions
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 12:13:03 -05:00
Natalie Arellano ae5039b232 Update TOC
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 12:07:18 -05:00
Natalie Arellano eb6afa242a Remove other references to stacks and mixins
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 12:04:48 -05:00
Natalie Arellano 4165ecbae8 Add target env variables
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 11:56:36 -05:00
Natalie Arellano 1231cb2100 Rename distributions -> distros for parity with platform
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 11:44:33 -05:00
Natalie Arellano 941516ee28 Wording
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 11:38:39 -05:00
Natalie Arellano ae549c2d47 Update distributions
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 11:37:07 -05:00
Natalie Arellano 0373ea9f2a Rename architecture -> arch to match buildpack spec
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 10:49:48 -05:00
Natalie Arellano 84e00b6e36 Update `stacks` to `targets` in buildpack.toml
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 10:48:02 -05:00
Natalie Arellano ec8769e0b3 Small syntax change
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 10:43:26 -05:00
Natalie Arellano 10293e9549 Rename platform -> target
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 10:29:38 -05:00
Natalie Arellano d6141f2f8c Remove other references to stack
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-06 10:26:49 -05:00
Natalie Arellano cac2d6e009 Describe how analyzed is used by the detector
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-05 16:55:23 -05:00
Natalie Arellano c58ae52a92 Remove language about a "contract"
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-05 16:35:55 -05:00
Natalie Arellano f31e623e17 Fix nesting
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-05 16:32:53 -05:00
Natalie Arellano 3140c7db6d Add guidance around SBOM and rebase
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-05 16:21:11 -05:00
Natalie Arellano 58904f2692 Add derive missing values for known stack ID
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-05 16:18:38 -05:00
Natalie Arellano 4531d8cf44 Format TOC, fix TODO
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-05 16:11:56 -05:00
Natalie Arellano a2d3554db4 Update analyzer
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-05 16:09:42 -05:00
Sambhav Kothari 53d6f3d685
Merge pull request #334 from edmorley/patch-1
Fix schema version markdown rendering in project-descriptor.md
2022-12-04 19:59:14 +05:30
Ed Morley 2bf99f1e67
Fix schema version markdown rendering in project-descriptor.md
The `<...>` references must be wrapped with backticks, or they are not rendered at all, making the spec hard to follow.

Example of the current broken rendering:

> MUST be in form . or , where is equivalent to .0



Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
2022-12-04 13:45:45 +00:00
Natalie Arellano d38828abcd Removed stack and mixin from terminology, updated stack section
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-12-01 09:58:28 -05:00
Sambhav Kothari 55c89179db
Merge pull request #328 from buildpacks/fix/process-display
Add buildpack API to io.buildpacks.build.metadata label
2022-11-23 14:22:03 +00:00
Sambhav Kothari e418312d79
Merge pull request #329 from buildpacks/fix/kaniko-dir
Clarify: `<kaniko-dir>` is an input to the extender
2022-11-23 14:21:48 +00:00
Sambhav Kothari da08950773
Merge pull request #332 from buildpacks/lifecycle-sbom
[RFC 0112] Platform API changes for lifecycle/launcher SBOM
2022-11-21 22:14:27 +00:00
Natalie Arellano a7c0c9d485 Clarify: `<kaniko-dir>` is an input to the extender
(This was added for the restorer but inadvertently omitted from the extender)

Also lints table borders and properly alphabetizes restorer inputs

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-11-10 16:18:59 -05:00
Natalie Arellano 8023c3d44a Add buildpack API to io.buildpacks.build.metadata label
For newer platform API (0.10 and above) we need to know the buildpack API to know
if the process args are overridable or not (when there is more than one element in the command,
the process is definitely from a newer buildpack, but if there is only one element in the command,
the args could be overridable or not overridable depending on the buildpack API).

Having this information will allow platforms such as pack to display process information to end users.

The lifecycle is already adding processes[0].buildpackID to the label, this updates the spec to reflect
the current implementation.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-11-10 13:02:21 -05:00
Natalie Arellano 47785e0bdb Init platform API 0.11
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-11-10 12:33:39 -05:00
Natalie Arellano b31f86dd80 Platform API changes for lifecycle/launcher SBOM RFC
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-10 15:24:08 -04:00
5 changed files with 682 additions and 378 deletions

View File

@ -50,6 +50,6 @@ When the specification refers to a path in the context of an OCI layer tar (e.g.
These documents currently specify:
- Buildpack API: `0.9`
- Buildpack API: `0.10`
- Distribution API: `0.3`
- Platform API: `0.10`
- Platform API: `0.14`

View File

@ -24,7 +24,6 @@ This document specifies the interface between a lifecycle program and one or mor
- [Phase #1: Detection](#phase-1-detection)
- [Purpose](#purpose)
- [Process](#process)
- [Mixin Satisfaction](#mixin-satisfaction)
- [Order Resolution](#order-resolution)
- [Phase #2: Analysis](#phase-2-analysis)
- [Purpose](#purpose-1)
@ -51,6 +50,7 @@ This document specifies the interface between a lifecycle program and one or mor
- [Process](#process-5)
- [Environment](#environment)
- [Provided by the Lifecycle](#provided-by-the-lifecycle)
- [Targets](#targets)
- [Layer Paths](#layer-paths)
- [Provided by the Platform](#provided-by-the-platform)
- [Provided by the Buildpacks](#provided-by-the-buildpacks)
@ -71,17 +71,18 @@ This document specifies the interface between a lifecycle program and one or mor
- [Buildpack Plan (TOML)](#buildpack-plan-toml)
- [Layer Content Metadata (TOML)](#layer-content-metadata-toml)
- [buildpack.toml (TOML)](#buildpacktoml-toml)
- [Stacks](#stacks)
- [Targets](#targets-1)
- [Order](#order)
- [Exec.d Output (TOML)](#execd-output-toml)
- [Deprecations](#deprecations)
- [buildpack.toml (TOML) `stacks` Array](#buildpacktoml-toml-stacks-array)
- [Positional Arguments to `detect` and `build` Executables](#positional-arguments-to-detect-and-build-executables)
- [launch.toml (TOML) `bom` Array](#launchtoml-toml-bom-array)
- [build.toml (TOML) `bom` Array](#buildtoml-toml-bom-array)
- [Build Plan (TOML) `requires.version` Key](#build-plan-toml-requiresversion-key)
## Buildpack API Version
This document specifies Buildpack API version `0.9`
This document specifies Buildpack API version `0.10`
Buildpack API versions:
- MUST be in form `<major>.<minor>` or `<major>`, where `<major>` is equivalent to `<major>.0`
@ -102,7 +103,7 @@ A **component buildpack** is a buildpack containing `/bin/detect` and `/bin/buil
A **composite buildpack** is a buildpack containing an order definition in `buildpack.toml`. Composite buildpacks do not contain `/bin/detect` or `/bin/build` executables. They MUST be [resolvable](#order-resolution) into a collection of component buildpacks.
An **image extension** (**experimental**) is a directory containing an `extension.toml`. Extensions generate Dockerfiles that can be used to define the runtime base image, prior to buildpack execution. Extensions implement the [Image Extension Interface](image-extension.md). Extensions are always "component": their `extension.toml` cannot contain an order definition.
An **image extension** is a directory containing an `extension.toml`. Extensions generate Dockerfiles that can be used to define the runtime base image, prior to buildpack execution. Extensions implement the [Image Extension Interface](image_extension.md). Extensions are always "component": their `extension.toml` cannot contain an order definition.
**Resolving an order** is the process by which an order (which may contain image extensions, component buildpacks, or composite buildpacks) is evaluated together with application source code to produce an optional group of image extensions and a required group of component buildpacks that can be used to build the application. This process is known as **detection**. During detection, the `/bin/detect` executable for each image extension (if present) and the `/bin/detect` executable for each component buildpack is invoked.
@ -132,10 +133,6 @@ A **layer directory** is a directory created by a component buildpack that conta
* a **build layer** contains child directories with paths that are added to the environment (e.g., `PATH`, `LD_LIBRARY_PATH`, etc.) for subsequent buildpacks in the same build
Any combination of the three layer types are valid for a particular layer directory.
A **stack** is a contract, implemented by a **build image** and **run image**, that guarantees properties of the **build environment** and **app image**. The provided stack is communicated to component buildpacks through the `CNB_STACK_ID` environment variable, enabling each component buildpack to modify its behavior when executed on different stacks.
A **mixin** is a named set of additions to a stack that can be used to make additive changes to the contract. Buildpacks can express their required mixins in `buildpack.toml`.
## Buildpack Interface
The following specifies the interface implemented by component buildpacks.
@ -164,14 +161,14 @@ The lifecycle MAY return an error to the platform if two or more buildpacks with
Executable: `/bin/detect`, Working Dir: `<app[AR]>`
| Input | Attributes | Description |
|--------------------------|------------|-----------------------------------------------|
| `$0` | | Absolute path of `/bin/detect` executable |
| `$CNB_BUILD_PLAN_PATH` | E | Absolute path of the build plan |
| `$CNB_BUILDPACK_DIR` | ER | Absolute path of the buildpack root directory |
| `$CNB_PLATFORM_DIR` | AR | Absolute path of the platform directory |
| `$CNB_PLATFORM_DIR/env/` | AR | User-provided environment variables for build |
| `$CNB_PLATFORM_DIR/#` | AR | Platform-specific extensions |
| Input | Attributes | Description |
|--------------------------|------------|---------------------------------------------------|
| `$0` | | Absolute path of `/bin/detect` executable |
| `$CNB_BUILD_PLAN_PATH` | E | Absolute path of the build plan |
| `$CNB_BUILDPACK_DIR` | ER | Absolute path of the buildpack root directory |
| `$CNB_PLATFORM_DIR` | AR | Absolute path of the platform directory |
| `$CNB_PLATFORM_DIR/env/` | AR | User-provided environment variables for build |
| `$CNB_PLATFORM_DIR/#` | AR | Platform-specific extensions |
| Output | Description |
|------------------------|---------------------------------------------|
@ -372,10 +369,13 @@ For each image extension ("extension") or component buildpack ("buildpack") in e
The selected group MUST be filtered to only include extensions and buildpacks with exit status zero.
The order of the extensions and buildpacks in the group MUST otherwise be preserved.
For each `/bin/detect` executable in each extension or buildpack, the lifecycle:
- MUST configure the environment as described in the [Environment](#environment) section.
The `/bin/detect` executable in each extension or buildpack, when executed:
- MAY read the app directory.
- MAY read the detect environment as described in the [Environment](#environment) section.
- MAY emit error, warning, or debug messages to `stderr`.
- MAY augment the Build Plan by writing TOML to `<plan>`.
- MUST set an exit status code as described in the [Buildpack Interface](#buildpack-interface) section.
@ -400,21 +400,8 @@ For each trial,
The lifecycle MAY execute each `/bin/detect` within a group in parallel.
The lifecycle MUST run `/bin/detect` for all extensions and buildpacks in a group in a container using common stack with a common set of mixins.
The lifecycle MUST fail detection if any of the buildpacks does not list that stack in `buildpack.toml`.
The lifecycle MUST fail detection if any of the buildpacks specifies a mixin associated with that stack in `buildpack.toml` that is not satisfied, see [Mixin Satisfaction](#mixin-satisfaction) below.
#### Mixin Satisfaction
A buildpack's mixin requirements must be satisfied by the stack in one of the following scenarios.
1) the stack provides the mixin `run:<mixin>` and the buildpack requires `run:<mixin>`
2) the stack provides the mixin `build:<mixin>` and the buildpack requires `build:<mixin>`
3) the stack provides the mixin `<mixin>` and the buildpack requires `<mixin>`
4) the stack provides the mixin `<mixin>` and the buildpack requires `build:<mixin>`
5) the stack provides the mixin `<mixin>` and the buildpack requires `run:<mixin>`
6) the stack provides the mixin `<mixin>` and the buildpack requires both `run:<mixin>` and `build:<mixin>`
7) the stack provides the mixins `build:<mixin>` and `run:<mixin>` the buildpack requires `<mixin>`
The lifecycle MUST run `/bin/detect` for all extensions and buildpacks in a group in a container using a common build environment.
If any non-optional buildpack in a group fails to declare a target in `buildpack.toml` matching the build-time and runtime base images, and in the case that no targets are declared and the [inferred target](#targets-1) does not match, the lifecycle MUST fail detection for the group. For matching criteria, see [buildpack.toml](#buildpacktoml-toml).
#### Order Resolution
@ -513,7 +500,7 @@ The purpose of the generation phase is to generate Dockerfiles that can be used
### Process
See the [Image Extension Specification](#image-extension.md).
See the [Image Extension Specification](#image_extension.md).
## Phase #4: Extension (image extensions only)
@ -687,7 +674,7 @@ The purpose of export is to create a new OCI image using a combination of remote
- The `<layers>` directories provided to each buildpack during the build phase,
- The `<app>` directory processed by the buildpacks during the build phase,
- The buildpack IDs associated with the buildpacks used during the build phase, in order of execution,
- A reference to the most recent version of the run image associated with the stack and mixins,
- A reference to the most recent version of the run image,
- A reference to the old OCI image processed during the analysis phase, if available, and
- A tag for a new OCI image,
@ -760,9 +747,21 @@ The purpose of launch is to modify the running app environment using app-provide
### Provided by the Lifecycle
#### Targets
The following environment variables MUST be set by the lifecycle during the `detect` and `build` phases to describe the target runtime image, if inputs are provided.
| Env Variable | Description |
|-----------------------------|--------------------------------------------|
| `CNB_TARGET_OS` | Target OS |
| `CNB_TARGET_ARCH` | Target architecture |
| `CNB_TARGET_ARCH_VARIANT` | Target architecture variant (optional) |
| `CNB_TARGET_DISTRO_NAME` | Target OS distribution name (optional) |
| `CNB_TARGET_DISTRO_VERSION` | Target OS distribution version (optional) |
#### Layer Paths
The following layer path environment variables MUST be set by the lifecycle during the build and launch phases in order to make buildpack dependencies accessible.
The following layer path environment variables MUST be set by the lifecycle during the `build` and `launch` phases in order to make buildpack dependencies accessible.
During the build phase, each variable designated for build MUST contain absolute paths of all previous buildpacks `<layers>/<layer>/` directories that are designated for build.
@ -782,19 +781,18 @@ In either case,
| `CPATH` | `/include` | header files | [x] | |
| `PKG_CONFIG_PATH` | `/pkgconfig` | pc files | [x] | |
### Provided by the Platform
The following additional environment variables MUST NOT be overridden by the lifecycle.
| Env Variable | Description | Detect | Build | Launch
|-----------------|------------------------------------------------|--------|-------|--------
| `CNB_STACK_ID` | Chosen stack ID | [x] | [x] |
| `BP_*` | User-provided variable for buildpack | [x] | [x] |
| `BPL_*` | User-provided variable for exec.d | | | [x]
| `HOME` | Current user's home directory | [x] | [x] | [x]
| Env Variable | Description | Detect | Build | Launch |
|------------------------|---------------------------------------------------|--------|-------|--------|
| `BP_*` | User-provided variable for buildpack | [x] | [x] | |
| `BPL_*` | User-provided variable for exec.d | | | [x] |
| `HOME` | Current user's home directory | [x] | [x] | [x] |
During the detection and build phases, the lifecycle MUST provide any user-provided environment variables as files in `<platform>/env/` with file names and contents matching the environment variable names and contents.
During the detection and build phases, the lifecycle MUST provide as environment variables any user-provided files in `<platform>/env/` with environment variable names and contents matching the file names and contents.
During the detection and build phases, the lifecycle MUST provide as environment variables any operator-provided files in `<build-config>/env` with environment variable names and contents matching the file names and contents. This applies for all values of `clear-env` or if `clear-env` is undefined in `buildpack.toml`.
When `clear-env` in `buildpack.toml` is set to `true` for a given buildpack, the lifecycle MUST NOT set user-provided environment variables in the environment of `/bin/detect` or `/bin/build`.
@ -802,8 +800,6 @@ When `clear-env` in `buildpack.toml` is not set to `true` for a given buildpack,
1. For layer path environment variables, user-provided values are prepended before any existing values and are delimited by the OS path list separator.
2. For all other environment variables, user-provided values override any existing values.
Buildpacks MAY use the value of `CNB_STACK_ID` to modify their behavior when executed on different stacks.
The environment variable prefix `CNB_` is reserved.
It MUST NOT be used for environment variables that are not defined in this specification or approved extensions.
@ -1059,9 +1055,13 @@ id = "<buildpack ID>"
version = "<buildpack version>"
optional = false
[[stacks]]
id = "<stack ID>"
mixins = ["<mixin name>"]
[[targets]]
os = "<OS name>"
arch = "<architecture>"
variant = "<architecture variant>"
[[targets.distros]]
name = "<OS distribution name>"
version = "<OS distribution version>"
[metadata]
# buildpack-specific data
@ -1081,8 +1081,6 @@ Buildpack authors MUST choose a globally unique ID, for example: "io.buildpacks.
- Each element MUST increase numerically.
- Buildpack authors will define what changes will increment `X`, `Y`, and `Z`.
If an `order` is specified, then `stacks` MUST NOT be specified.
**The buildpack API:**
*Key: `api = "<buildpack API version>"`*
@ -1102,17 +1100,24 @@ The `[[buildpack.licenses]]` table is optional and MAY contain a list of buildpa
*Key: `sbom-formats = [ "<string>" ]`*
- MUST be supported SBOM media types as described in [Software-Bill-of-Materials](#software-bill-of-materials).
#### Stacks
#### Targets
A buildpack descriptor may specify `stacks`.
A buildpack descriptor SHOULD specify `targets`.
Each stack in `stacks` either:
- MUST identify a compatible stack:
- `id` MUST be set to a [valid stack ID](https://github.com/buildpacks/spec/blob/main/platform.md#stack-id).
- `mixins` MAY contain one or more mixin names.
- Or MUST indicate compatibility with any stack:
- `id` MUST be set to the special value `"*"`.
- `mixins` MUST be empty.
Each target in `targets`:
- MUST identify a compatible runtime environment:
- `os`, `arch`, and `variant` if provided MUST be valid identifiers as defined in the [OCI Image Specification](https://github.com/opencontainers/image-spec/blob/main/config.md)
- `distros` if provided MUST describe the OS distributions supported by the buildpack
- For Linux-based images, `distros.name` and `distros.version` SHOULD contain the values specified in `/etc/os-release` (`$ID` and `$VERSION_ID`), as the `os.version` field in an image config may contain combined distribution and version information
- For Windows-based images, `distros.name` SHOULD be empty; `distros.version` SHOULD contain the value of `os.version` in the image config (e.g., `10.0.14393.1066`)
- Any field not provided will be interpreted as `<matches any>`
If the `targets` list is empty, tools reading `buildpack.toml` will assume:
- `os = "linux"` and `arch = <matches any>` if `./bin/build` is present
- `os = "windows"` and `arch = <matches any>` if `./bin/build.bat` or `./bin/build.exe` are present
Metadata specified in `[[targets]]` is validated against the runtime and build-time base images.
* A buildpack target satisfies a base image target when `os`, `arch`, and `variant` match and at least one distribution in `distros` (if provided) matches
#### Order
@ -1135,6 +1140,41 @@ Each `key`:
## Deprecations
This section describes all the features that are deprecated.
### buildpack.toml (TOML) `stacks` Array
_Deprecated in Buildpack API 0.10._
The `stacks` array is deprecated.
```toml
[[stacks]]
id = "<stack ID>"
mixins = ["<mixin name>"]
```
Each stack in `stacks` either:
- MUST identify a compatible stack:
- `id` MUST be set to a [valid stack ID](https://github.com/buildpacks/spec/blob/main/platform.md#stack-id).
- `mixins` MAY contain one or more mixin names.
- Or MUST indicate compatibility with any stack:
- `id` MUST be set to the special value `"*"`.
- `mixins` MUST be empty.
If an `order` is specified, then `stacks` MUST NOT be specified.
Tools reading `buildpack.toml` will translate any section that sets `stacks.id = "io.buildpacks.stacks.bionic"` to:
```toml
[[targets]]
os = "linux"
arch = "amd64"
[[targets.distros]]
name = "ubuntu"
version = "18.04"
```
Furthermore, any buildpack that contains `[[stacks]]` with `id = "*"` will match any target.
### Positional Arguments to `detect` and `build` Executables
_Deprecated in Buildpack API 0.8._
@ -1202,48 +1242,3 @@ If the `bom` array is used, the buildpack:
When the build is complete, a legacy build BOM describing the build container MAY be generated for auditing purposes.
If generated, this legacy build BOM MUST contain all `bom` entries in each `build.toml` at the end of each `/bin/build` execution, in adherence with the process and data format outlined in the [Platform Interface Specification](platform.md) for legacy BOM formats.
### Build Plan (TOML) `requires.version` Key
_Deprecated in Buildpack API 0.3._
The `requires.version` and `or.requires.version` keys are deprecated.
```toml
[[requires]]
name = "<dependency name>"
version = "<dependency version>"
[[or.requires]]
name = "<dependency name>"
version = "dependency version>"
```
To upgrade, buildpack authors SHOULD set `requires.version` as `requires.metadata.version` and `or.requires.version` as `or.requires.metadata.version`.
```toml
[[requires]]
name = "<dependency name>"
[requires.metadata]
version = "<dependency version>"
[[or.requires]]
name = "<dependency name>"
[or.requires.metadata]
version = "<dependency version>"
```
If `requires.version` and `requires.metadata.version` or `or.requires.version` and `or.requires.metadata.version` are both defined then lifecycle will fail.
For backwards compatibility, the lifecycle will produce a Buildpack Plan (TOML) that puts `version` in `entries.metadata` as long as `version` does not exist in `requires.metadata`.
```toml
[[entries]]
name = "<dependency name>"
[entries.metadata]
version = "<dependency version>"
```

View File

@ -29,8 +29,8 @@ This document specifies Project Descriptor Schema Version `0.2`.
The Schema Version format follows the form of the [Buildpack API Version](https://github.com/buildpacks/spec/blob/main/buildpack.md#buildpack-api-version):
* MUST be in form <major>.<minor> or <major>, where <major> is equivalent to <major>.0
* When <major> is greater than 0 increments to <minor> SHALL exclusively indicate additive changes
* MUST be in form `<major>.<minor>` or `<major>`, where `<major>` is equivalent to `<major>.0`
* When `<major>` is greater than 0, increments to `<minor>` SHALL exclusively indicate additive changes
## Special Value Types

View File

@ -1,4 +1,4 @@
# Image Extension Interface Specification (**experimental**)
# Image Extension Interface Specification
This document specifies the interface between a lifecycle program and one or more image extensions.
@ -21,7 +21,7 @@ This document specifies the interface between a lifecycle program and one or mor
## Image Extension API Version
This document accompanies Buildpack API version `0.9`.
This document accompanies Buildpack API version `0.10`.
## Image Extension Interface
@ -89,15 +89,40 @@ Correspondingly, each `/bin/generate` executable:
- MAY log output from the build process to `stdout`.
- MAY emit error, warning, or debug messages to `stderr`.
- MAY write either or both of `build.Dockerfile` and `run.Dockerfile` to the `<output>` directory. This file MUST adhere to the requirements listed below.
- MAY create the following folders in the `<output>` directory with an arbitrary content:
either:
- `context`
or the image-specific folders:
- `context.run`
- `context.build`
- MAY write key-value pairs to `<output>/extend-config.toml` that are provided as build args to build.Dockerfile when extending the build image.
- MUST NOT write SBOM (Software-Bill-of-Materials) files as described in the [Software-Bill-of-Materials](#software-bill-of-materials) section.
#### Context Folders
- The `<output>/context` folder MUST NOT be created together with any combination of the image-specific folders.
- If the folder `<output>/context` is present it will be set as the build context during the `extend` phase of the build and run images.
- If the folder `<output>/context.run` is present it will be set as the build context during the `extend` phase of the run image only.
- If the folder `<output>/context.build` is present it will be set as the build context during the `extend` phase of the build image only.
- If none of these folders is not present, the build context defaults to the `<app>` folder.
#### Dockerfile Requirements
A `run.Dockerfile`
- MAY contain a single `FROM` instruction
- MUST NOT contain any other instructions
- MUST NOT contain any other `FROM` instructions
- MAY contain `ADD`, `ARG`, `COPY`, `ENV`, `LABEL`, `RUN`, `SHELL`, `USER`, and `WORKDIR` instructions
- SHOULD NOT contain any other instructions
- SHOULD use the `build_id` build arg to invalidate the cache after a certain layer. When the `$build_id` build arg is referenced in a `RUN` instruction, all subsequent layers will be rebuilt on the next build (as the value will change); the `build_id` build arg SHOULD be defaulted to 0 if used (this ensures portability)
- SHOULD NOT edit `<app>`, `<layers>`, or `<platform>` directories (see the [Platform Interface Specification](platform.md)) as changes will not be persisted
- SHOULD use the `user_id` and `group_id` build args to reset the image config's `User` field to its original value if any `USER` instructions are employed
- SHOULD set the label `io.buildpacks.rebasable` to `true` to indicate that any new run image layers are safe to rebase on top of new runtime base images
- For the final image to be rebasable, all applied Dockerfiles must set this label to `true`
A `build.Dockerfile`
@ -110,7 +135,8 @@ FROM ${base_image}
- MAY contain `ADD`, `ARG`, `COPY`, `ENV`, `LABEL`, `RUN`, `SHELL`, `USER`, and `WORKDIR` instructions
- SHOULD NOT contain any other instructions
- SHOULD use the `build_id` build arg to invalidate the cache after a certain layer. When the `$build_id` build arg is referenced in a `RUN` instruction, all subsequent layers will be rebuilt on the next build (as the value will change); the `build_id` build arg SHOULD be defaulted to 0 if used (this ensures portability)
- SHOULD NOT edit `<app>`, `<layers>`, or `<workspace>` directories (see the [Platform Interface Specification](platform.md)) as changes will not be persisted
- SHOULD NOT edit `<app>`, `<layers>`, or `<platform>` directories (see the [Platform Interface Specification](platform.md)) as changes will not be persisted
- SHOULD use the `user_id` and `group_id` build args to reset the image config's `User` field to its original value if any `USER` instructions are employed
## Phase: Extension
@ -132,6 +158,9 @@ For each Dockerfile in the group in order, the lifecycle MUST apply the Dockerfi
- When there are multiple Dockerfiles, the value MUST be the intermediate image generated from the application of the previous Dockerfile.
- A `build_id` build arg
- The value MUST be a UUID
- `user_id` and `group_id` build args
- For the first Dockerfile, the values MUST be the original `uid` and `gid` from the `User` field of the config for the original base image.
- When there are multiple Dockerfiles, the values MUST be the `uid` and `gid` from the `User` field of the config for the intermediate image generated from the application of the previous Dockerfile.
## Data Format
@ -155,24 +184,45 @@ keywords = [ "<string>" ]
[[extension.licenses]]
type = "<string>"
uri = "<uri>"
[[targets]]
os = "<OS name>"
arch = "<architecture>"
variant = "<architecture variant>"
[[targets.distros]]
name = "<OS distribution name>"
version = "<OS distribution version>"
[metadata]
# extension-specific data
```
Image extension authors MUST choose a globally unique ID, for example: "io.buildpacks.apt".
The image extension `id`, `version`, `api`, and `licenses` entries MUST follow the requirements defined in the [Buildpack Interface Specification](buildpack.md).
An extension descriptor MAY specify `targets` following the requirements defined in the [Buildpack Interface Specification](buildpack.md).
### extend-config.toml (TOML)
```toml
[[build.args]]
name = "<build arg name>"
value = "<build arg value>"
[[run.args]]
name = "<build arg name>"
value = "<build arg value>"
```
The image extension MAY specify any number of args.
For each arg, the image extension:
- MUST specify a `name` to be the name of a build argument that will be provided to any output build.Dockerfile when extending the build base image.
For each `[[build.args]]`, the image extension:
- MUST specify a `name` to be the name of a build argument that will be provided to any output `build.Dockerfile` when extending the build base image.
- MUST specify a `value` to be the value of the build argument that is provided.
For each `[[run.args]]`, the image extension:
- MUST specify a `name` to be the name of a build argument that will be provided to any output `run.Dockerfile` when extending the runtime base image.
- MUST specify a `value` to be the value of the build argument that is provided.
### Build Plan (TOML)

File diff suppressed because it is too large Load Diff