Compare commits

...

338 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 1f6a3adf43
Merge pull request #326 from buildpacks/buildpack/0.9
Finalize buildpack/0.9
2022-10-31 13:27:48 -04:00
Natalie Arellano de932c4b1d
Merge branch 'main' into buildpack/0.9 2022-10-31 13:27:14 -04:00
Natalie Arellano d8e7ab1677
Merge pull request #325 from buildpacks/platform/0.10
Finalize platform/0.10
2022-10-31 13:24:36 -04:00
Natalie Arellano a841d93958 Update buildpack api version in README
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-31 12:18:00 -04:00
Natalie Arellano a56442e85c
Merge pull request #321 from buildpacks/extensions-buildpack-api-phase-2
Buildpack api changes to support phase 2 of Dockerfiles implementation
2022-10-31 12:16:31 -04:00
Natalie Arellano 7ff3540571
Update image_extension.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-31 12:16:22 -04:00
Natalie Arellano 2d68317d9d Fix platform/0.10
7354e22195 erroneously
pulled in old versions of files besides platform.md

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-31 11:38:15 -04:00
Natalie Arellano 63f5a99fe7 Revert "Merge branch 'main' into platform/0.10"
This reverts commit ef59a245ec, reversing
changes made to 8f7d9e539a.
2022-10-31 11:27:49 -04:00
Natalie Arellano ef59a245ec Merge branch 'main' into platform/0.10 2022-10-31 11:26:51 -04:00
Natalie Arellano 8f7d9e539a Update api version in README and platform spec
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-31 11:22:58 -04:00
Natalie Arellano 72ed478986
Merge pull request #323 from buildpacks/jab/update-launcher-default-args
Update launcher spec to support default process args
2022-10-31 10:27:00 -04:00
Natalie Arellano 25fb1c093c
Merge pull request #324 from buildpacks/clarify-skip-restore-2
Makes creator spec internally consistent
2022-10-31 10:26:46 -04:00
Natalie Arellano ff4a5df825
Merge pull request #320 from buildpacks/extensions-platform-api-phase-2
Platform api changes to support phase 2 of Dockerfiles implementation
2022-10-31 10:26:35 -04:00
Natalie Arellano a2fc25e1e2 Update label
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-28 12:12:28 -04:00
Natalie Arellano c68faf97ea
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-28 12:05:49 -04:00
Natalie Arellano 4864b74f77 Add build-imag to analyzed.toml
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-21 12:09:19 -04:00
Natalie Arellano f0a3ef244a Remove <image> as an argument to the extender in favor of passing the reference via analyzed.toml
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-13 11:52:55 -04:00
Natalie Arellano 687d37182d
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-13 11:44:27 -04:00
Natalie Arellano 73c62df901 Makes creator spec internally consistent by clarifying that -skip-restore
still restores store.toml.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-13 11:40:21 -04:00
Natalie Arellano 71d495bb29 Image is a required argument for the extender
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-10-11 12:35:19 -04: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
Natalie Arellano a9d2f4079c Extensions for Windows are not supported
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-09-22 16:51:33 -04:00
Natalie Arellano 8b5dea8b0f MUST -> SHOULD
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-09-22 16:04:14 -04:00
Natalie Arellano e56e65df25 Add input for kaniko cache TTL
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-09-14 13:22:22 -04:00
Natalie Arellano e6c4e936d2 Extensions should receive `CNB_EXTENSION_DIR`
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-09-14 13:18:05 -04:00
Jesse Brown 21caa23e55
Update launcher spec to support default process args
Issue #322

Signed-off-by: Jesse Brown <jabrown85@gmail.com>
2022-09-01 11:07:05 -05:00
Natalie Arellano 297b8e0067 Buildpack changes to support "phase 2" (build image extension) of Dockerfiles
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-08-24 15:17:30 -04:00
Natalie Arellano af4c2fc1b1 Update table of contents
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-08-24 14:55:05 -04:00
Natalie Arellano bd18d79bc8 Platform changes to support "phase 2" (build image extension) of Dockerfiles
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-08-24 13:25:05 -04:00
Natalie Arellano fbec0bccd3
Merge pull request #319 from buildpacks/extensions-platform-api
(Fix) Platform api changes to support phase 1 of Dockerfiles implementation
2022-08-24 10:39:10 -04:00
Natalie Arellano 7354e22195 Revert "Merge branch 'main' into extensions-platform-api"
This reverts commit 2d73272a51, reversing
changes made to a5acc10fba.
2022-08-24 09:56:28 -04:00
Natalie Arellano d02326e98c
Merge pull request #318 from buildpacks/revert-308-extensions-platform-api
Revert "Platform api changes to support phase 1 of Dockerfiles implementation"
2022-08-24 09:35:57 -04:00
Natalie Arellano 27ad6edce6 Remove output-dir in favor of generated-dir
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-08-24 09:34:45 -04:00
Natalie Arellano 105a8320bb
Revert "Platform api changes to support phase 1 of Dockerfiles implementation" 2022-08-24 09:27:19 -04:00
Natalie Arellano b4eeb43906
Merge pull request #308 from buildpacks/extensions-platform-api
Platform api changes to support phase 1 of Dockerfiles implementation
2022-08-23 13:11:31 -04:00
Sambhav Kothari be79544e91
Merge pull request #307 from buildpacks/extensions-buildpack-api
Buildpack api changes to support phase 1 of Dockerfiles implementation
2022-08-23 09:54:06 +01:00
Sambhav Kothari 847476cc93
Merge pull request #300 from buildpacks/buildpack-terminology
Add terminology section to the buildpack spec
2022-08-23 09:53:47 +01:00
Natalie Arellano 2d73272a51
Merge branch 'main' into extensions-platform-api 2022-08-16 11:30:59 -04:00
Natalie Arellano a5acc10fba
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-08-16 09:51:49 -04:00
Sambhav Kothari 24a550f021
Merge pull request #305 from mboldt/remove-shell-buildpack
Remove shell-specific logic from Buildpack API
2022-08-15 23:01:32 +01:00
Sambhav Kothari 85eaef18fa
Merge pull request #317 from buildpacks/distribution-codeowner
add platform team lead as a co-codeowner of distribution spec
2022-08-12 19:55:47 +01:00
Terence Lee 3decde5af0
add platform team lead as a co-codeowner of distribution spec
Signed-off-by: Terence Lee <hone02@gmail.com>
2022-07-27 14:16:05 -05:00
Mikey Boldt 322221a83a Apply suggestions from code review
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Mikey Boldt 32a191ae00 Consolidate process definition details in launch.toml description
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Mikey Boldt 7d23c69075 Move launcher execution details to platform spec.
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Mikey Boldt 46244c32f2 Add pointer to Platform spec for launch details
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Mikey Boldt 4d57c56354 Update buildpack.md
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Mikey Boldt 6a746a0da9 Update buildpack.md
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Mikey Boldt e64c2620c2 Update buildpack.md
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Mikey Boldt 67a95b1ca6 Add process definition section and table
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Mikey Boldt 31d63c95d8 Fix grammar
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Mikey Boldt 4578d8ce4c Remove shell-specific logic
Closes #244

Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-07-15 15:55:15 -05:00
Natalie Arellano f9057980ed Remove line describing build.toml left in by mistake
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-14 15:34:14 -04:00
Natalie Arellano e403a02f3c Updates per 7/14 Working Group
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-14 15:32:01 -04:00
Natalie Arellano a2a0e2d6ab Link to build plan
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-12 13:44:25 -04:00
Natalie Arellano e8dda220d4 Clarify the meaning of `extension` in plan.toml
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-12 12:06:20 -04:00
Natalie Arellano be44080aee
Update platform.md
Co-authored-by: Javier Romero <rjavier@vmware.com>

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-12 11:57:48 -04:00
Natalie Arellano e9b350aa48
Update platform.md
Co-authored-by: Javier Romero <rjavier@vmware.com>

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-12 11:57:18 -04:00
Natalie Arellano 642eaf4ca9
Update platform.md
Co-authored-by: Javier Romero <rjavier@vmware.com>

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-12 11:57:03 -04:00
Natalie Arellano b900760f4d Update env var name
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-07 12:06:09 -04:00
Natalie Arellano ba59390341 Add nested output directories
A couple other small fixes.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-07-07 11:40:56 -04:00
Natalie Arellano 251c7a0a2a Fix generate exit code
The 80 range is for the launcher.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-29 14:01:19 -04:00
Natalie Arellano d6324b5488 Update terminology section for image extensions
Also make clear that generation is for extensions and build is for buildpacks

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-27 15:38:00 -04:00
Natalie Arellano 0253313313 Updates from PR review
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-27 11:48:04 -04:00
Natalie Arellano 942165b7ec Merge branch 'buildpack-terminology' into extensions-buildpack-api 2022-06-27 11:43:23 -04:00
Natalie Arellano 1d79fcb2bb Update with information about experimental features
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-24 15:48:59 -04:00
Natalie Arellano 4960f4800e
Merge pull request #315 from BarDweller/extensions-buildpack-api
cache svgs and set svg bg to white (helps with github darkmode)
2022-06-24 15:30:44 -04:00
Natalie Arellano b8e6b139f2 Updates per recent Working Group discussions
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-24 15:29:55 -04:00
Natalie Arellano b75f220834 More changes
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-16 15:01:37 -04:00
Natalie Arellano 8e70e24e4a Update rest of buildpack.md with terminology
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-16 14:57:32 -04:00
Natalie Arellano b34152e572 Merge branch 'buildpack/0.9' into buildpack-terminology 2022-06-16 14:43:05 -04:00
Natalie Arellano 2af7150830 Updates from Working Group
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-16 14:41:59 -04:00
BarDweller 6f4a4084ff cache svgs and set svg bg to white (helps with github darkmode)
Signed-off-by: BarDweller <bardweller@gmail.com>
2022-06-16 11:05:18 -04:00
Natalie Arellano 505b7d5472 Updates from implementation
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-15 17:27:21 -04:00
Natalie Arellano da18b780cf Add extension to build plan
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-15 17:18:51 -04:00
Natalie Arellano 9867543440 Updates from implementation
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-06-15 17:14:23 -04:00
Sambhav Kothari 2c57001625
Merge pull request #311 from buildpacks/samj1912-patch-1
Update codeowners to reflect governance structure
2022-06-15 14:43:41 -04:00
Sambhav Kothari 0866c0de7a
Merge branch 'main' into samj1912-patch-1 2022-06-02 00:43:22 +01:00
Sambhav Kothari 96af51ad82
Merge pull request #312 from buildpacks/samj1912-patch-2
Deprecate the CNB Bindings spec
2022-06-02 00:43:04 +01:00
Sambhav Kothari beaf4496bb
Merge pull request #310 from AidanDelaney/use-oci-registry
Replace docker registry with OCI registry
2022-05-25 22:08:47 +01:00
Sambhav Kothari 02a6472f16 Update codeowners to reflect governance structure
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
2022-05-25 20:52:56 +01:00
Sambhav Kothari e8289884b2
Deprecate the CNB Bindings spec 2022-05-25 18:55:58 +01:00
Aidan Delaney e16727d747 Replace docker registry with OCI registry
Update language to prefer the term "OCI registry" over "docker registry"

Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
2022-05-17 11:53:50 +01:00
Natalie Arellano e669a537b7 Add extensions to build metadata
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-05-02 12:44:01 -04:00
Natalie Arellano 9a5955f464 Buildpack api changes to support phase 1 of Dockerfiles implementation
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-04-15 17:48:33 -04:00
Natalie Arellano 42a62e905d Platform api changes to support phase 1 of Dockerfiles implementation
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-04-15 16:24:04 -04:00
Natalie Arellano ff54426f2f Updates per PR feedback
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-04-15 10:54:57 -04:00
Terence Lee 11539381c1
Merge pull request #302 from buildpacks/buildpack/0.8
Finalize Buildpack API 0.8
2022-04-06 13:30:57 -05:00
Terence Lee 33e6b7f3e1
Merge branch 'main' into buildpack/0.8 2022-04-06 13:30:24 -05:00
Terence Lee c0f5149822
Merge pull request #304 from buildpacks/clarify-cnb-buildpack-dir
List CNB_BUILDPACK_DIR with other lifecycle provided variables
2022-04-06 13:30:00 -05:00
Terence Lee edac0f7214
Merge pull request #303 from buildpacks/platform/0.9
Finalize Platform API 0.9
2022-04-06 13:11:31 -05:00
Terence Lee b9860681f1
Merge branch 'main' into platform/0.9 2022-04-06 13:09:58 -05:00
Terence Lee f38b0b2ee9
Merge pull request #301 from buildpacks/bump-version-platform
Bump platform and buildpack api versions for upcoming releases
2022-04-06 13:06:02 -05:00
Natalie Arellano 1f9f3534c3 Bump buildpack api version in README
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-04-06 13:47:25 -04:00
Natalie Arellano 31b1cf7707 Move buildpack api version bump to other PR
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-04-06 13:46:07 -04:00
Natalie Arellano 4db387c7b0 List CNB_BUILDPACK_DIR with other lifecycle provided variables
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-04-05 12:52:19 -04:00
Natalie Arellano 58cd5509d5 Bump versions in README
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-30 15:55:03 -04:00
Natalie Arellano e5db594303 Bump platform version
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-30 15:05:18 -04:00
Emily Casey b0383cae78
Merge pull request #295 from mboldt/buildpack-args-to-env
Deprecate positional args to `build` and `detect` and add env vars
2022-03-30 13:20:04 -04:00
Emily Casey 9462d35c0a
Merge pull request #292 from buildpacks/source-date-epoch
Add mechanism for platform to provide image creation time
2022-03-30 13:17:44 -04:00
Natalie Arellano 7578a07e1f Add information about layer types
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-25 14:59:48 -04:00
Natalie Arellano ad46084e46 Add terminology section to the buildpack spec
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-25 14:37:42 -04:00
Mikey Boldt 80c933311b Restructure Deprecations section
- Remove API version headings.
- Add "Deprecated in Buildpack API X.Y" to each item.
- Order the list of deprecations newest-on-top.

Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-03-23 16:17:28 -05:00
Mikey Boldt 16d0b14d6b Remove deprecated positional args from main body
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-03-17 12:42:43 -05:00
Emily Casey b00386e688
Merge pull request #297 from buildpacks/fix-sbom-location
Change legacy sbom location to a top level combined one
2022-03-17 09:41:13 -04:00
Natalie Arellano a3ff2cbe38 Remove superfluous wording in reproducibility
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-16 10:09:25 -04:00
Sambhav Kothari 4ecdae57a9
Change legacy sbom location to a top level combined one
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
2022-03-09 23:23:27 +00:00
Emily Casey 2437d7b26d
Merge pull request #289 from buildpacks/proc-work-dir
Process specific working directory
2022-03-09 14:14:29 -05:00
Emily Casey 6261d3e756
Merge pull request #288 from buildpacks/remove-bom
Remove legacy bom for platform/0.9
2022-03-09 14:13:20 -05:00
Emily Casey 5e218b6669
Merge pull request #290 from buildpacks/proc-work-dir-platform
Process specific working directory
2022-03-09 14:00:31 -05:00
Natalie Arellano 69ca1c31b5 Specify where legacy boms can be found by the platform
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-09 13:57:57 -05:00
Natalie Arellano 6f6491046a Remove legacy bom for platform/0.9
Legacy boms output by older buildpacks will be ignored by the platform.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-09 13:53:38 -05:00
Mikey Boldt 296bb61893 Add attributes of `build` and `detect` input env vars
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-03-02 22:57:35 -06:00
Mikey Boldt 78f9907ba3 Whitespace
Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-03-02 22:55:10 -06:00
Mikey Boldt 3883a60d68 Deprecate positional args to `build` and `detect` and add env vars
Per RFC 100: https://github.com/buildpacks/rfcs/blob/main/text/0100-buildpack-input-vars.md

Fixes #294.

Signed-off-by: Mikey Boldt <mboldt@vmware.com>
2022-03-02 22:53:53 -06:00
Natalie Arellano e3ba9c3b7a Change working-directory to working-dir
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-02 18:04:54 -05:00
Natalie Arellano 968f7c4a58 Change working-directory to working-dir
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-02 18:01:59 -05:00
Natalie Arellano 7261f55aad
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-03-02 17:59:32 -05:00
Emily Casey 16d50fd299
Merge pull request #293 from buildpacks/fix/layers-sbom-path
Fix layers/sbom path in platform spec
2022-03-02 13:49:09 -05:00
Natalie Arellano 0ecb2fe305 Remove standalone lines, and add one more line
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-02-24 16:23:08 -05:00
Natalie Arellano e06c670cf3
Apply suggestions from code review
Signed-off-by: Natalie Arellano <narellano@vmware.com>

Co-authored-by: Emily Casey <ecasey@vmware.com>
2022-02-24 16:19:02 -05:00
Natalie Arellano 843dfdec90 Fix incorrect layer sbom paths in platform spec
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-02-17 11:10:17 -05:00
Natalie Arellano d6060b7c0b Add details for exporter
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-02-16 13:56:02 -05:00
Natalie Arellano 57ea1c9464 Further clarification
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-02-16 10:57:46 -05:00
Natalie Arellano 270ca04619 Reorder things and clarify the working directory for exec.d and profile.d
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-02-11 10:53:22 -05:00
Natalie Arellano 61351819c1 Add mechanism for platform to provide image creation time.
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-02-11 09:58:52 -05:00
Natalie Arellano f56cf851b6
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>

Co-authored-by: Emily Casey <ecasey@vmware.com>
2022-02-09 14:07:33 -05:00
Natalie Arellano a2358f32fa Process specific working directory
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-01-27 11:51:37 -05:00
Natalie Arellano b1c7fe155f Process specific working directory
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-01-27 11:30:25 -05:00
Emily Casey 674ed57f4d
Merge pull request #283 from buildpacks/decouple-bp-api
Make the platform api more agnostic about the buildpack api WRT bom support
2022-01-26 14:13:57 -05:00
Emily Casey e7c095954f
Merge pull request #286 from buildpacks/sbom-compat
Add deprecation path for buildpacks using the legacy BOM format.
2022-01-26 13:06:58 -05:00
Terence Lee e51d0e4260
Merge pull request #280 from buildpacks/clarify-skip-restore
Clarify what -skip-restore means
2022-01-19 13:12:35 -06:00
Terence Lee 7a4e3cc3ec
Merge pull request #278 from buildpacks/sbom-fix
Updates platform spec to improve performance when restoring launch sboms from daemon
2022-01-19 13:11:10 -06:00
Natalie Arellano d965c9ca31 Add deprecation path for buildpacks using the legacy BOM format.
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-01-18 16:54:49 -05:00
Natalie Arellano afb61bb471
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>

Co-authored-by: Anthony Emengo <anthonyemengojr@gmail.com>
2022-01-14 15:23:38 -05:00
Natalie Arellano 39cff8268a
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>

Co-authored-by: Anthony Emengo <anthonyemengojr@gmail.com>
2022-01-14 15:23:31 -05:00
Natalie Arellano 2685b3ffd0
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>

Co-authored-by: Anthony Emengo <anthonyemengojr@gmail.com>
2022-01-14 15:23:25 -05:00
Natalie Arellano 23d9b6fe89
Update platform.md
Signed-off-by: Natalie Arellano <narellano@vmware.com>

Co-authored-by: Emily Casey <ecasey@vmware.com>
2022-01-13 14:53:41 -05:00
Natalie Arellano 9db2976bb0 Makes the platform api less aware of the buildpack api, thus decoupling the two.
The platform api doesn't need to care in which buildpack api legacy boms are supported, only that they might be.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
2022-01-13 11:17:50 -05:00
Terence Lee d0ea5ba164
Merge pull request #281 from buildpacks/reserved-ids
Add sbom as a reserved buildpack ID
2022-01-12 13:16:31 -06:00
Terence Lee e8f6b45b12
Merge pull request #279 from buildpacks/box-link-fix
Fixes link to SBOM section in buildpack spec
2022-01-12 13:14:36 -06:00
Natalie Arellano 90dcd478d5 Add sbom as a reserved buildpack ID
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2021-12-15 12:22:16 -05:00
Natalie Arellano 0034fb475c Clarify the definition of -skip-restore
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2021-12-15 12:18:27 -05:00
Natalie Arellano dab2facfa0 Fixes link to SBOM section in buildpack spec
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2021-12-15 12:16:30 -05:00
Natalie Arellano d0aaf31408 Updates platform spec to improve performance when restoring launch sboms from daemon
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2021-12-15 12:10:14 -05:00
Joe Kutner d76b64ee76
Merge pull request #274 from buildpacks/jromero-patch-1
Bump platform API version to 0.8
2021-11-18 14:27:24 -06:00
Javier Romero 1e6e6d9c39
Bump platform API version to 0.8 2021-11-18 14:24:29 -06:00
13 changed files with 1362 additions and 707 deletions

View File

@ -1 +1,6 @@
* @buildpacks/core-team
/platform.md @buildpacks/implementation-team-lead @buildpacks/platform-team-lead
/buildpack.md @buildpacks/bat-team-lead @buildpacks/implementation-team-lead
/distribution.md @buildpacks/distribution-team-lead @buildpacks/platform-team-lead
/extensions/buildpack-registry.md @buildpacks/distribution-team-lead
/extensions/project-descriptor.md @buildpacks/platform-team-lead
* @buildpacks/team-leads

4
OWNERS
View File

@ -1,4 +0,0 @@
Stephen Levine, Pivotal <slevine@pivotal.io> (@sclevine)
Ben Hale, Pivotal <bhale@pivotal.io> (@nebhale)
Terence Lee, Salesforce <hone02@gmail.com> (@hone)
Joe Kutner, Salesforce <jkutner@salesforce.com> (@jkutner)

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.7`
- Buildpack API: `0.10`
- Distribution API: `0.3`
- Platform API: `0.8`
- Platform API: `0.14`

View File

@ -2,23 +2,14 @@
This document specifies the interface between a lifecycle program and one or more buildpacks.
The lifecycle program uses buildpacks to build software artifacts from source code and pack the result into an OCI image.
This is accomplished in four phases:
1. **Detection,** where an optimal selection of compatible buildpacks is chosen.
2. **Analysis,** where metadata about OCI layers generated during a previous build are made available to buildpacks.
3. **Build,** where buildpacks use that metadata to generate only the OCI layers that need to be replaced.
4. **Export,** where the remote layers are replaced by the generated layers.
The `ENTRYPOINT` of the OCI image contains logic implemented by the lifecycle that executes during the **Launch** phase.
## Table of Contents
<!-- Using https://github.com/yzhang-gh/vscode-markdown to manage toc -->
- [Buildpack Interface Specification](#buildpack-interface-specification)
- [Table of Contents](#table-of-contents)
- [Buildpack API Version](#buildpack-api-version)
- [Terminology](#terminology)
- [CNB Terminology](#cnb-terminology)
- [Buildpack Interface](#buildpack-interface)
- [Buildpack API Compatibility](#buildpack-api-compatibility)
- [Key](#key)
@ -30,7 +21,6 @@ The `ENTRYPOINT` of the OCI image contains logic implemented by the lifecycle th
- [Build Layers](#build-layers)
- [Cached Layers](#cached-layers)
- [Ignored Layers](#ignored-layers)
- [App Interface](#app-interface)
- [Phase #1: Detection](#phase-1-detection)
- [Purpose](#purpose)
- [Process](#process)
@ -38,24 +28,29 @@ The `ENTRYPOINT` of the OCI image contains logic implemented by the lifecycle th
- [Phase #2: Analysis](#phase-2-analysis)
- [Purpose](#purpose-1)
- [Process](#process-1)
- [Phase #3: Build](#phase-3-build)
- [Phase #3: Generation (image extensions only)](#phase-3-generation-image-extensions-only)
- [Purpose](#purpose-2)
- [Process](#process-2)
- [Phase #4: Extension (image extensions only)](#phase-4-extension-image-extensions-only)
- [Purpose](#purpose-3)
- [Phase #5: Build (component buildpacks only)](#phase-5-build-component-buildpacks-only)
- [Purpose](#purpose-4)
- [Process](#process-3)
- [Unmet Buildpack Plan Entries](#unmet-buildpack-plan-entries)
- [Software Bill of Materials](#software-bill-of-materials)
- [Software-Bill-of-Materials](#software-bill-of-materials)
- [Layers](#layers)
- [Providing Layers](#providing-layers)
- [Reusing Layers](#reusing-layers)
- [Slice Layers](#slice-layers)
- [Phase #4: Export](#phase-4-export)
- [Purpose](#purpose-3)
- [Process](#process-3)
- [Launch](#launch)
- [Purpose](#purpose-4)
- [Phase #6: Export](#phase-6-export)
- [Purpose](#purpose-5)
- [Process](#process-4)
- [Launch](#launch)
- [Purpose](#purpose-6)
- [Process](#process-5)
- [Environment](#environment)
- [Provided by the Lifecycle](#provided-by-the-lifecycle)
- [Buildpack Specific Variables](#buildpack-specific-variables)
- [Targets](#targets)
- [Layer Paths](#layer-paths)
- [Provided by the Platform](#provided-by-the-platform)
- [Provided by the Buildpacks](#provided-by-the-buildpacks)
@ -76,30 +71,77 @@ The `ENTRYPOINT` of the OCI image contains logic implemented by the lifecycle th
- [Buildpack Plan (TOML)](#buildpack-plan-toml)
- [Layer Content Metadata (TOML)](#layer-content-metadata-toml)
- [buildpack.toml (TOML)](#buildpacktoml-toml)
- [Buildpack Implementations](#buildpack-implementations)
- [Order Buildpacks](#order-buildpacks)
- [Targets](#targets-1)
- [Order](#order)
- [Exec.d Output (TOML)](#execd-output-toml)
- [Deprecations](#deprecations)
- [`0.3`](#03)
- [Build Plan (TOML) `requires.version` Key](#build-plan-toml-requiresversion-key)
- [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.7`
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`
- `<major>` and `<minor>` MUST only contain numbers (unsigned 64 bit integer)
- When `<major>` is greater than `0` increments to `<minor>` SHALL exclusively indicate additive changes
## Terminology
### CNB Terminology
A **buildpack** is a directory containing a `buildpack.toml`. Buildpacks analyze application source code and determine the best way to build it.
A **buildpack group**, or **group**, is a list of one or more buildpacks that are designed to work together - for example, a buildpack that provides `node` and a buildpack that provides `npm`.
An **order** is a list of one or more groups to be tested against application source code, so that the appropriate group for a build can be determined.
A **component buildpack** is a buildpack containing `/bin/detect` and `/bin/build` executables. Component buildpacks implement the [Buildpack Interface](#buildpack-interface).
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** 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.
An **optional** image extension or buildpack is a group element that, when failing detection, will be excluded from the group without causing the entire group to fail.
A **build plan** is a file used during detection, in which each image extension or component buildpack may express the dependencies that it requires and the dependencies that it provides. A group will only pass detection if a valid build plan can be produced from the dependencies that all elements in the group require and provide. A valid build plan is a plan where all required dependencies are provided in the necessary order, meaning that during the build phase, each component buildpack will have its required dependencies provided by an image extension or component buildpack that runs before it.
A **buildpack plan** is a file unique to each image extension or component buildpack, used during the generation or build phase to communicate the dependencies that it is expected to provide.
A **lifecycle** is software that orchestrates a build. It executes in a series of phases that each have a distinct responsibility.
A **launcher** is an executable that is the `ENTRYPOINT` of the exported OCI image. It is used to start processes at runtime. Having a launcher enables multiple process types to be defined on an image, with process-specific environment variables and other functionality.
**Launch** describes the process of running an application by creating a container from the exported OCI image.
A **platform** is a system or software that orchestrates the lifecycle by invoking each lifecycle phase in order.
A **process definition** is a description, provided by component buildpacks during the build phase, of a process to launch at runtime.
An **application directory** is a directory containing application source code. Component buildpacks may make changes to the application directory during the build phase.
A **layer** is a set of filesystem changes packaged according to the [OCI Image Specification](https://github.com/opencontainers/image-spec/blob/main/layer.md).
A **layer directory** is a directory created by a component buildpack that contains build and/or runtime dependencies, and can be used to configure the build and/or runtime environment. There are three **layer types**:
* a **launch layer** is added as a layer in the exported OCI image; it can be re-used on the next build (the lifecycle can avoid re-uploading it) if the component buildpack that created the layer has the same requirements on the next build
* a **cache layer** is saved to the cache and its contents may be restored on the next build
* 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.
## Buildpack Interface
The following specifies the interface implemented by executables in each buildpack.
The lifecycle MUST invoke these executables as described in the Phase sections.
The following specifies the interface implemented by component buildpacks.
The lifecycle MUST invoke executables in component buildpacks as described in the Phase sections.
### Buildpack API Compatibility
Given a buildpack declaring `<buildpack API Version>` in its [`buildpack.toml`](#buildpacktoml-toml), the lifecycle:
- MUST either conform to the matching version of this specification when interfacing with the buildpack or
- return an error to the platform if it does not support `<buildpack API Version>`
- MUST return an error to the platform if it does not support `<buildpack API Version>`
The lifecycle MAY return an error to the platform if two or more buildpacks within a group declare buildpack API versions that the lifecycle cannot support together within a single build, even if both are supported independently.
@ -117,58 +159,61 @@ The lifecycle MAY return an error to the platform if two or more buildpacks with
### Detection
Executable: `/bin/detect <platform[AR]> <plan[E]>`, Working Dir: `<app[AR]>`
Executable: `/bin/detect`, Working Dir: `<app[AR]>`
| Input | Description
|-------------------|----------------------------------------------
| `$0` | Absolute path of `/bin/detect` executable
| `<platform>/env/` | User-provided environment variables for build
| `<platform>/#` | Platform-specific extensions
| Output | Description
|--------------------|----------------------------------------------
| [exit status] | Pass (0), fail (100), or error (1-99, 101+)
| Standard output | Logs (info)
| Standard error | Logs (warnings, errors)
| `<plan>` | Contributions to the the Build Plan (TOML)
| 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 |
|------------------------|---------------------------------------------|
| [exit status] | Pass (0), fail (100), or error (1-99, 101+) |
| Standard output | Logs (info) |
| Standard error | Logs (warnings, errors) |
| `$CNB_BUILD_PLAN_PATH` | Contributions to the the Build Plan (TOML) |
### Build
Executable: `/bin/build <layers[EIC]> <platform[AR]> <plan[ER]>`, Working Dir: `<app[AI]>`
Executable: `/bin/build`, Working Dir: `<app[AI]>`
| Input | Description
|-------------------|----------------------------------------------
| `$0` | Absolute path of `/bin/build` executable
| `<plan>` | Relevant [Buildpack Plan entries](#buildpack-plan-toml) from detection (TOML)
| `<platform>/env/` | User-provided environment variables for build
| `<platform>/#` | Platform-specific extensions
| Input | Attributes | Description |
|--------------------------|------------|-------------------------------------------------------------------------------|
| `$0` | | Absolute path of `/bin/build` executable |
| `$CNB_LAYERS_DIR` | EIC | Absolute path of the buildpack layers directory |
| `$CNB_BP_PLAN_PATH` | ER | Relevant [Buildpack Plan entries](#buildpack-plan-toml) from detection (TOML) |
| `$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
|------------------------------------------|--------------------------------------
| [exit status] | Success (0) or failure (1+)
| Standard output | Logs (info)
| Standard error | Logs (warnings, errors)
| `<layers>/launch.toml` | App metadata (see [launch.toml](#launchtoml-toml))
| `<layers>/launch.sbom.<ext>` | Launch Software Bill of Materials (see [Software-Bill-of-Materials](#bill-of-materials))
| `<layers>/build.toml` | Build metadata (see [build.toml](#buildtoml-toml))
| `<layers>/build.sbom.<ext>` | Build Software Bill of Materials (see [Software-Bill-of-Materials](#bill-of-materials))
| `<layers>/store.toml` | Persistent metadata (see [store.toml](#storetoml-toml))
| `<layers>/<layer>.toml` | Layer metadata (see [Layer Content Metadata](#layer-content-metadata-toml))
| `<layers>/<layer>.sbom.<ext>` | Layer Software Bill of Materials (see [Software-Bill-of-Materials](#bill-of-materials))
| `<layers>/<layer>/bin/` | Binaries for launch and/or subsequent buildpacks
| `<layers>/<layer>/lib/` | Shared libraries for launch and/or subsequent buildpacks
| `<layers>/<layer>/profile.d/` | Scripts sourced by Bash before launch
| `<layers>/<layer>/profile.d/<process>/` | Scripts sourced by Bash before launch for a particular process type
| `<layers>/<layer>/exec.d/` | Executables that provide env vars via the [Exec.d Interface](#execd) before launch
| `<layers>/<layer>/exec.d/<process>/` | Executables that provide env vars for a particular process type via the [Exec.d Interface](#execd) before launch
| `<layers>/<layer>/include/` | C/C++ headers for subsequent buildpacks
| `<layers>/<layer>/pkgconfig/` | Search path for pkg-config for subsequent buildpacks
| `<layers>/<layer>/env/` | Env vars for launch and/or subsequent buildpacks
| `<layers>/<layer>/env.launch/` | Env vars for launch (after `env`, before `profile.d`)
| `<layers>/<layer>/env.launch/<process>/` | Env vars for launch (after `env`, before `profile.d`) for the launched process
| `<layers>/<layer>/env.build/` | Env vars for subsequent buildpacks (after `env`)
| `<layers>/<layer>/*` | Other content for launch and/or subsequent buildpacks
| Output | Description |
|-------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| [exit status] | Success (0) or failure (1+) |
| Standard output | Logs (info) |
| Standard error | Logs (warnings, errors) |
| `$CNB_LAYERS_DIR/launch.toml` | App metadata (see [launch.toml](#launchtoml-toml)) |
| `$CNB_LAYERS_DIR/launch.sbom.<ext>` | Launch Software Bill of Materials (see [Software-Bill-of-Materials](#software-bill-of-materials)) |
| `$CNB_LAYERS_DIR/build.toml` | Build metadata (see [build.toml](#buildtoml-toml)) |
| `$CNB_LAYERS_DIR/build.sbom.<ext>` | Build Software Bill of Materials (see [Software-Bill-of-Materials](#software-bill-of-materials)) |
| `$CNB_LAYERS_DIR/store.toml` | Persistent metadata (see [store.toml](#storetoml-toml)) |
| `$CNB_LAYERS_DIR/<layer>.toml` | Layer metadata (see [Layer Content Metadata](#layer-content-metadata-toml)) |
| `$CNB_LAYERS_DIR/<layer>.sbom.<ext>` | Layer Software Bill of Materials (see [Software-Bill-of-Materials](#software-bill-of-materials)) |
| `$CNB_LAYERS_DIR/<layer>/bin/` | Binaries for launch and/or subsequent buildpacks |
| `$CNB_LAYERS_DIR/<layer>/lib/` | Shared libraries for launch and/or subsequent buildpacks |
| `$CNB_LAYERS_DIR/<layer>/exec.d/` | Executables that provide env vars via the [Exec.d Interface](#execd) before launch |
| `$CNB_LAYERS_DIR/<layer>/exec.d/<process>/` | Executables that provide env vars for a particular process type via the [Exec.d Interface](#execd) before launch |
| `$CNB_LAYERS_DIR/<layer>/include/` | C/C++ headers for subsequent buildpacks |
| `$CNB_LAYERS_DIR/<layer>/pkgconfig/` | Search path for pkg-config for subsequent buildpacks |
| `$CNB_LAYERS_DIR/<layer>/env/` | Env vars for launch and/or subsequent buildpacks |
| `$CNB_LAYERS_DIR/<layer>/env.launch/` | Env vars for launch (after `env`, before `exec.d`) |
| `$CNB_LAYERS_DIR/<layer>/env.launch/<process>/` | Env vars for launch (after `env`, before `exec.d`) for the launched process |
| `$CNB_LAYERS_DIR/<layer>/env.build/` | Env vars for subsequent buildpacks (after `env`) |
| `$CNB_LAYERS_DIR/<layer>/*` | Other content for launch and/or subsequent buildpacks |
### Exec.d
@ -288,52 +333,49 @@ At the end of each individual buildpack's build phase:
- The lifecycle:
- MUST rename `<layers>/<layer>/` to `<layers>/<layer>.ignore/` for all layers where `launch = false`, `build = false`, and `cache = false`, in order to prevent subsequent buildpacks from accidentally depending on an ignored layer.
## App Interface
| Output | Description
|------------------------|----------------------------------------------
| `<app>/.profile` | [](README.md#linux-only) Bash-formatted script sourced by shell before launch
| `<app>/.profile.bat` | [](README.md#windows-only) BAT-formatted script sourced by shell before launch
## Phase #1: Detection
![Detection](img/detection.svg)
### Purpose
The purpose of detection is to find an ordered group of buildpacks to use during the build phase.
The purpose of detection is to find an ordered group of component buildpacks - and, optionally, image extensions - to use during the generation and build phases.
These buildpacks must be compatible with the app.
For detect requirements that are specific to image extensions, see the [Image Extension Interface](image-extension.md).
### Process
**GIVEN:**
- An ordered list of buildpack groups resolved into buildpack implementations as described in [Order Resolution](#order-resolution)
- An ordered list of resolved groups as described in [Order Resolution](#order-resolution)
- A directory containing application source code
- A shell, if needed,
For each buildpack in each group in order, the lifecycle MUST execute `/bin/detect`.
For each image extension ("extension") or component buildpack ("buildpack") in each group in order, the lifecycle MUST execute `/bin/detect`. Image extensions MUST always be optional during detection.
1. **If** the exit status of `/bin/detect` is non-zero and the buildpack is not marked optional, \
1. **If** the exit status of a buildpack `/bin/detect` is non-zero and the buildpack is not marked optional, \
**Then** the lifecycle MUST proceed to the next group or fail detection completely if no more groups are present.
2. **If** the exit status of `/bin/detect` is zero or the buildpack is marked optional,
1. **If** the buildpack is not the last buildpack in the group, \
**Then** the lifecycle MUST proceed to the next buildpack in the group.
2. **If** the exit status of `/bin/detect` is zero or the extension or buildpack is marked optional,
1. **If** the extension or buildpack is not the last in the group, \
**Then** the lifecycle MUST proceed to the next extension or buildpack in the group.
2. **If** the buildpack is the last buildpack in the group,
1. **If** no exit statuses from `/bin/detect` in the group are zero \
2. **If** the extension or buildpack is the last in the group,
1. **If** no exit statuses from buildpack `/bin/detect` in the group are zero \
**Then** the lifecycle MUST proceed to the next group or fail detection completely if no more groups are present.
2. **If** at least one exit status from `/bin/detect` in the group is zero \
**Then** the lifecycle MUST select this group and proceed to the analysis phase.
2. **If** at least one exit status from a buildpack `/bin/detect` in the group is zero \
**Then** the lifecycle MUST select this group and MAY proceed to the generation phase.
The selected group MUST be filtered to only include buildpacks with exit status zero.
The order of the buildpacks in the group MUST otherwise be preserved.
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.
The `/bin/detect` executable in each buildpack, when executed:
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.
@ -344,64 +386,58 @@ Each `requires` and `provides` section MUST be a list of entries formatted as de
Each pairing of `requires` and `provides` sections (at the top level, or inside of an `or` array) is a potential Build Plan.
For a given buildpack group, a sequence of trials is generated by selecting a single potential Build Plan from each buildpack in a left-to-right, depth-first order.
For a given group, a sequence of trials is generated by selecting a single potential Build Plan from each extension or buildpack in a left-to-right, depth-first order.
The group fails to detect if all trials fail to detect.
For each trial,
- If a required buildpack provides a dependency that is not required by the same buildpack or a subsequent buildpack, the trial MUST fail to detect.
- If a required buildpack requires a dependency that is not provided by the same buildpack or a previous buildpack, the trial MUST fail to detect.
- If an optional buildpack provides a dependency that is not required by the same buildpack or a subsequent buildpack, the optional buildpack MUST be excluded from the build phase and its requires and provides MUST be excluded from the Build Plan.
- If an extension provides a dependency that is not required by a subsequent buildpack, the extension MUST be excluded from the build phase and its provides MUST be excluded from the Build Plan.
- If an optional buildpack requires a dependency that is not provided by the same buildpack or a previous buildpack, the optional buildpack MUST be excluded from the build phase and its requires and provides MUST be excluded from the Build Plan.
- Multiple buildpacks MAY require or provide the same dependency.
- Multiple extensions MAY provide the same dependency.
The lifecycle MAY execute each `/bin/detect` within a group in parallel.
The lifecycle MUST run `/bin/detect` for all buildpacks in a group in a container using common stack with a common set of mixins.
The lifecycle MUST fail detection if any of those buildpacks does not list that stack in `buildpack.toml`.
The lifecycle MUST fail detection if any of those 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
During detection, an order definition MUST be resolved into individual buildpack implementations.
During detection, an order definition for image extensions (if present) and an order definition for buildpacks MUST be resolved into a group of image extensions and a group of component buildpacks.
Order definitions for image extensions MUST NOT contain nested orders.
If an order definition for image extensions is present, it MUST be prepended to the order definition for buildpacks before the resolution process occurs.
The resolution process MUST follow this pattern:
Where:
- O and P are buildpack orders.
- A through H are buildpack implementations.
- O and P are orders for image extensions or buildpacks.
- A through H are image extensions or component buildpacks.
Given:
<img src="http://tex.s2cms.ru/svg/%0AO%20%3D%0A%5Cbegin%7Bbmatrix%7D%0AA%2C%20%26%20B%20%5C%5C%0AC%2C%20%26%20D%0A%5Cend%7Bbmatrix%7D%0A" alt="
O =
![
O =
\begin{bmatrix}
A, &amp; B \\
C, &amp; D
\end{bmatrix}
" />
](img/matrix1.svg)
<img src="http://tex.s2cms.ru/svg/%0AP%20%3D%0A%5Cbegin%7Bbmatrix%7D%0AE%2C%20%26%20F%20%5C%5C%0AG%2C%20%26%20H%0A%5Cend%7Bbmatrix%7D%0A" alt="
![
P =
\begin{bmatrix}
E, &amp; F \\
G, &amp; H
\end{bmatrix}
" />
"](img/matrix2.svg)
It MUST follow that:
<img src="http://tex.s2cms.ru/svg/%0A%5Cbegin%7Bbmatrix%7D%0AE%2C%20%26%20O%2C%20%26%20F%0A%5Cend%7Bbmatrix%7D%20%3D%20%0A%5Cbegin%7Bbmatrix%7D%0AE%2C%20%26%20A%2C%20%26%20B%2C%20%26%20F%20%5C%5C%0AE%2C%20%26%20C%2C%20%26%20D%2C%20%26%20F%20%5C%5C%0A%5Cend%7Bbmatrix%7D%0A" alt="
![
\begin{bmatrix}
E, &amp; O, &amp; F
\end{bmatrix} =
@ -409,9 +445,9 @@ E, &amp; O, &amp; F
E, &amp; A, &amp; B, &amp; F \\
E, &amp; C, &amp; D, &amp; F \\
\end{bmatrix}
" />
](img/matrix3.svg)
<img src="http://tex.s2cms.ru/svg/%0A%5Cbegin%7Bbmatrix%7D%0AO%2C%20%26%20P%0A%5Cend%7Bbmatrix%7D%20%3D%20%0A%5Cbegin%7Bbmatrix%7D%0AA%2C%20%26%20B%2C%20%26%20E%2C%20%26%20F%20%5C%5C%0AA%2C%20%26%20B%2C%20%26%20G%2C%20%26%20H%20%5C%5C%0AC%2C%20%26%20D%2C%20%26%20E%2C%20%26%20F%20%5C%5C%0AC%2C%20%26%20D%2C%20%26%20G%2C%20%26%20H%20%5C%5C%0A%5Cend%7Bbmatrix%7D%0A" alt="
![
\begin{bmatrix}
O, &amp; P
\end{bmatrix} =
@ -421,7 +457,7 @@ A, &amp; B, &amp; G, &amp; H \\
C, &amp; D, &amp; E, &amp; F \\
C, &amp; D, &amp; G, &amp; H \\
\end{bmatrix}
" />
](img/matrix4.svg)
Note that buildpack IDs are expanded depth-first in left-to-right order.
@ -433,7 +469,7 @@ If a buildpack order entry within a group has the parameter `optional = true`, t
### Purpose
The purpose of analysis is to restore `<layers>/<layer>.toml`, `<layers>/<layer>.sbom.<ext>`, and `<layers>/store.toml` files that buildpacks may use to optimize the build and export phases.
The purpose of analysis is to restore `<layers>/<layer>.toml`, `<layers>/<layer>.sbom.<ext>`, and `<layers>/store.toml` files that component buildpacks may use to optimize the build and export phases.
### Process
@ -456,15 +492,31 @@ For each buildpack in the group, the lifecycle
After analysis, the lifecycle MUST proceed to the build phase.
## Phase #3: Build
## Phase #3: Generation (image extensions only)
### Purpose
The purpose of the generation phase is to generate Dockerfiles that can be used to define the build and/or runtime base image. The generation phase MUST NOT be run for Windows builds.
### Process
See the [Image Extension Specification](#image_extension.md).
## Phase #4: Extension (image extensions only)
### Purpose
The purpose of the extension phase is to apply the Dockerfiles generated in the generation phase to the appropriate base image. The extension phase MUST NOT be run for Windows builds.
## Phase #5: Build (component buildpacks only)
![Build](img/build.svg)
### Purpose
The purpose of build is to transform application source code into runnable artifacts that can be packaged into a container.
The purpose of build is to transform application source code into runnable artifacts that can be packaged into a container image.
During the build phase, typical buildpacks might:
During the build phase, typical component buildpacks might:
1. Read the Buildpack Plan in `<plan>` to determine what dependencies to provide.
1. Provide the application with dependencies for launch in `<layers>/<layer>`.
@ -496,9 +548,8 @@ This is achieved by:
- The final ordered group of buildpacks determined during the detection phase,
- A directory containing application source code,
- The Buildpack Plan,
- Any `<layers>/<layer>.toml` files placed on the filesystem during the analysis phase,
- Any locally cached `<layers>/<layer>` directories, and
- A shell, if needed,
- Any `<layers>/<layer>.toml` files placed on the filesystem during the analysis phase, and
- Any locally cached `<layers>/<layer>` directories,
For each buildpack in the group in order, the lifecycle MUST execute `/bin/build`.
@ -544,14 +595,16 @@ Correspondingly, each `/bin/build` executable:
#### Unmet Buildpack Plan Entries
A buildpack SHOULD designate a Buildpack Plan entry as unmet if the buildpack did not satisfy the requirement described by the entry.
A component buildpack SHOULD designate a Buildpack Plan entry as unmet if it did not satisfy the requirement described by the entry.
The lifecycle SHALL assume that all entries in the Buildpack Plan were satisfied by the buildpack unless the buildpack writes an entry with the given name to the `unmet` section of `build.toml`.
Image extensions MUST satisfy all entries in the Buildpack Plan.
For each entry in `<plan>`:
- **If** there is an unmet entry in `build.toml` with a matching `name`, the lifecycle
- MUST include the entry in the `<plan>` of the next buildpack that provided an entry with that name during the detection phase.
- MUST include the entry in the `<plan>` of the next component buildpack that provided an entry with that name during the detection phase.
- **Else**, the lifecycle
- MUST NOT include entries with matching names in the `<plan>` provided to subsequent buildpacks.
- MUST NOT include entries with matching names in the `<plan>` provided to subsequent image extensions or component buildpacks.
#### Software-Bill-of-Materials
@ -607,7 +660,7 @@ Additionally, a buildpack MAY specify sub-paths within `<app>` as `slices` in `l
Separate layers MUST be created during the export phase for each slice with one or more files or directories.
This minimizes data transfer when the app directory contains a known set of files.
## Phase #4: Export
## Phase #6: Export
![Export](img/export.svg)
@ -621,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,
@ -679,80 +732,36 @@ The purpose of launch is to modify the running app environment using app-provide
**GIVEN:**
- An OCI image exported by the lifecycle,
- A shell, if needed,
First, the lifecycle MUST locate a start command and choose an execution strategy.
To locate a start command, the lifecycle MUST follow the process outlined in the [Platform Interface Specification](platform.md).
To choose an execution strategy,
1. **If** a buildpack-provided process type is chosen as the start command,
1. **If** the process type has `direct` set to `false`,
1. **If** the process has one or more `args`
**Then** the lifecycle MUST invoke a command using the shell, where `command` and each entry in `args` are shell-parsed tokens in the command.
2. **If** the process has zero `args`
**Then** the lifecycle MUST invoke the value of `command` as a command using the shell.
2. **If** the process type does have `direct` set to `true`,
**Then** the lifecycle MUST invoke the value of `command` using the `execve` syscall with values of `args` provided as arguments.
2. **If** a user-defined process type is chosen as the start command,
**Then** the lifecycle MUST select an execution strategy as described in the [Platform Interface Specification](platform.md).
Given the start command and execution strategy,
1. The lifecycle MUST set all buildpack-provided launch environment variables as described in the [Environment](#environment) section.
2. The lifecycle MUST
1. [execute](#execd) each file in each `<layers>/<layer>/exec.d` directory in the launch environment and set the [returned variables](#execd-output-toml) in the launch environment before continuing,
1. Firstly, in order of `/bin/build` execution used to construct the OCI image.
2. Secondly, in alphabetically ascending order by layer directory name.
3. Thirdly, in alphabetically ascending order by file name.
2. [execute](#execd) each file in each `<layers>/<layer>/exec.d/<process>` directory in the launch environment and set the [returned variables](#execd-output-toml) in the launch environment before continuing,
1. Firstly, in order of `/bin/build` execution used to construct the OCI image.
2. Secondly, in alphabetically ascending order by layer directory name.
3. Thirdly, in alphabetically ascending order by file name.
1. The lifecycle MUST
1. [execute](#execd) each file in each `<layers>/<layer>/exec.d` as described in the [Platform Interface Specification](platform.md).
1. [execute](#execd) each file in each `<layers>/<layer>/exec.d/<process>` as described in the [Platform Interface Specification](platform.md).
3. If using an execution strategy involving a shell, the lifecycle MUST use a single shell process to
1. source each file in each `<layers>/<layer>/profile.d` directory,
1. Firstly, in order of `/bin/build` execution used to construct the OCI image.
2. Secondly, in alphabetically ascending order by layer directory name.
3. Thirdly, in alphabetically ascending order by file name.
2. source each file in each `<layers>/<layer>/profile.d/<process>` directory,
1. Firstly, in order of `/bin/build` execution used to construct the OCI image.
2. Secondly, in alphabetically ascending order by layer directory name.
3. Thirdly, in alphabetically ascending order by file name.
3. source [](README.md#linux-only)`<app>/.profile` or [](README.md#windows-only)`<app>/.profile.bat` if it is present.
1. The lifecycle MUST invoke the command with its arguments, environment, and working directory following the process outlined in the [Platform Interface Specification](platform.md).
3. If using an execution strategy involving a shell, the lifecycle MUST source [](README.md#linux-only)`<app>/.profile` or [](README.md#windows-only)`<app>/.profile.bat` if it is present.
4. The lifecycle MUST invoke the start command with the decided execution strategy.
[](README.md#linux-only)When executing a process using any execution strategy, the lifecycle SHOULD replace the lifecycle process in memory without forking it.
[](README.md#linux-only)When executing a process with Bash, the lifecycle SHOULD additionally replace the Bash process in memory without forking it.
[](README.md#windows-only)When executing a process with Command Prompt, the lifecycle SHOULD start a new process with the same security context, terminal, working directory, STDIN/STDOUT/STDERR handles and environment variables as the Command Prompt process.
[](README.md#linux-only)When executing a process, the lifecycle SHOULD replace the lifecycle process in memory without forking it.
## Environment
### Provided by the Lifecycle
#### Buildpack Specific Variables
#### Targets
The following environment variables MUST be set by the lifecycle in each buildpack's execution environment.
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.
These variables MAY differ between buildpacks.
| Env Variable | Description | Detect | Build | Launch
|---------------------|--------------------------------------|--------|-------|--------
| `CNB_BUILDPACK_DIR` | The root of the buildpack source | [x] | [x] |
| 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.
@ -772,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 profile.d or 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`.
@ -792,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.
@ -883,7 +889,7 @@ Prohibited:
### Requirements
The lifecycle MUST be implemented so that the detection and build phases do not have access to OCI image store credentials used in the analysis and export phases.
The lifecycle MUST be implemented so that the detection, generation, extension, and build phases do not have access to OCI image store credentials used in the analysis and export phases.
The lifecycle SHOULD be implemented so that each phase may run in a different container.
## Data Format
@ -897,16 +903,16 @@ value = "<label valu>"
[[processes]]
type = "<process type>"
command = "<command>"
command = ["<command>"]
args = ["<arguments>"]
direct = false
default = false
working-dir = "<working directory>"
[[slices]]
paths = ["<app sub-path glob>"]
```
The buildpack MAY specify any number of labels, processes, or slices.
The component buildpack MAY specify any number of labels, processes, or slices.
For each label, the buildpack:
@ -919,15 +925,19 @@ If multiple buildpacks define labels with the same key, the lifecycle MUST use t
For each process, the buildpack:
- MUST specify a `type`, which:
- MUST specify a `type`, an identifier for the process, which:
- MUST NOT be identical to other process types provided by the same buildpack.
- MUST only contain numbers, letters, and the characters ., _, and -.
- MUST specify a `command` that is either:
- A command sequence that is valid when executed using the shell, if `args` is not specified.
- A path to an executable or the file name of an executable in `$PATH`, if `args` is a list with zero or more elements.
- MAY specify an `args` list to be passed directly to the specified executable.
- MAY specify a `direct` boolean that bypasses the shell.
- MUST specify a `command` list such that:
- The first element of `command` is a path to an executable or the file name of an executable in `$PATH`.
- Any remaining elements of `command` are arguments that are always passed directly to the executable [^command-args].
- MAY specify an `args` list to be passed directly to the specified executable, after arguments specified in `command`.
- The `args` list is a default list of arguments that may be overridden by the user [^command-args].
- MAY specify a `default` boolean that indicates that the process type should be selected as the [buildpack-provided default](https://github.com/buildpacks/spec/blob/main/platform.md#outputs-4) during the export phase.
- MAY specify a `working-dir` for the process. The `working-dir` defaults to the application directory if not specified.
[^command-args]: For versions of the Platform API that do not support overridable arguments, the arguments in `command` and `args` are always applied together with any user-provided arguments.
In general, the [Platform Interface Specification](platform.md) is ultimately responsible for launching processes; consult that specification for details.
An individual buildpack may only specify one process type with `default = true`. The lifecycle MUST select, from all buildpack-provided process types, the last process type with `default = true` as the buildpack-provided default. If multiple buildpacks define processes of the same type, the lifecycle MUST use the last process type definition ordered by buildpack execution for the combined process list (a non-default process type definition may override a default process type definition, leaving the app image with no default).
@ -954,7 +964,7 @@ The lifecycle MUST include all unmatched files in the app directory in any numbe
name = "<dependency name>"
```
For each unmet entry in the Buildpack Plan, the buildpack:
For each unmet entry in the Buildpack Plan, the component buildpack:
- SHOULD add an entry to `unmet`.
For each entry in `unmet`:
@ -1019,7 +1029,6 @@ For a given layer, the buildpack MAY specify:
- Whether the layer is cached, intended for build, and/or intended for launch.
- Metadata that describes the layer contents.
### buildpack.toml (TOML)
This section describes the 'Buildpack descriptor'.
@ -1046,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
@ -1060,7 +1073,7 @@ Buildpack authors MUST choose a globally unique ID, for example: "io.buildpacks.
*Key: `id = "<buildpack ID>"`*
- MUST only contain numbers, letters, and the characters `.`, `/`, and `-`.
- MUST NOT be `config` or `app`.
- MUST NOT be `app`, `config`, `generated`, or `sbom`.
- MUST NOT be identical to any other buildpack ID when using a case-insensitive comparison.
**The buildpack version:**
@ -1068,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>"`*
@ -1089,23 +1100,28 @@ 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).
#### Buildpack Implementations
#### Targets
A buildpack descriptor that specifies `stacks` MUST describe a buildpack that implements the [Buildpack Interface](#buildpack-interface).
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>`
#### Order Buildpacks
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
A buildpack descriptor that specifies `order` MUST be [resolvable](#order-resolution) into an ordering of buildpacks that implement the [Buildpack Interface](#buildpack-interface).
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
A buildpack reference inside of a `group` MUST contain an `id` and `version`.
A buildpack reference inside of a `group` MUST contain an `id` and `version`. The `order` MUST include only buildpacks and MUST NOT include image extensions.
### Exec.d Output (TOML)
```
@ -1124,46 +1140,105 @@ Each `key`:
## Deprecations
This section describes all the features that are deprecated.
### `0.3`
### buildpack.toml (TOML) `stacks` Array
#### Build Plan (TOML) `requires.version` Key
_Deprecated in Buildpack API 0.10._
The `requires.version` and `or.requires.version` keys are deprecated.
The `stacks` array is deprecated.
```toml
[[requires]]
name = "<dependency name>"
version = "<dependency version>"
[[or.requires]]
name = "<dependency name>"
version = "dependency version>"
[[stacks]]
id = "<stack ID>"
mixins = ["<mixin name>"]
```
To upgrade, buildpack authors SHOULD set `requires.version` as `requires.metadata.version` and `or.requires.version` as `or.requires.metadata.version`.
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
[[requires]]
name = "<dependency name>"
[requires.metadata]
version = "<dependency version>"
[[or.requires]]
name = "<dependency name>"
[or.requires.metadata]
version = "<dependency version>"
[[targets]]
os = "linux"
arch = "amd64"
[[targets.distros]]
name = "ubuntu"
version = "18.04"
```
If `requires.version` and `requires.metadata.version` or `or.requires.version` and `or.requires.metadata.version` are both defined then lifecycle will fail.
Furthermore, any buildpack that contains `[[stacks]]` with `id = "*"` will match any target.
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`.
### Positional Arguments to `detect` and `build` Executables
_Deprecated in Buildpack API 0.8._
The positional arguments to the `detect` and `build` executables are deprecated.
The lifecycle provides these values as environment variables.
To upgrade, buildpack authors SHOULD use the following environment variables:
For `detect`:
- `CNB_PLATFORM_DIR` replaces the first positional argument.
- `CNB_BUILD_PLAN_PATH` replaces the second positional argument.
For `build`:
* `CNB_LAYERS_DIR` replaces the first positional argument.
* `CNB_PLATFORM_DIR` replaces the second positional argument.
* `CNB_BP_PLAN_PATH` replaces the third positional argument.
### launch.toml (TOML) `bom` Array
_Deprecated in Buildpack API 0.7._
The `bom` array is deprecated.
```toml
[[entries]]
[[bom]]
name = "<dependency name>"
[entries.metadata]
version = "<dependency version>"
[bom.metadata]
# arbitrary metadata describing the dependency
```
If the `bom` array is used, the buildpack:
- SHOULD add a bill-of-materials entry to the `bom` array describing each dependency contributed to the app image, where:
- `name` is REQUIRED.
- `metadata` MAY contain additional data describing the dependency.
The buildpack MAY add `bom` describing the contents of the app dir, even if they were not contributed by the buildpack.
When the build is complete, a legacy Bill of Materials (BOM) describing the app image MAY be generated for auditing purposes.
If generated, this legacy BOM MUST contain all `bom` entries in each `launch.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.toml (TOML) `bom` Array
_Deprecated in Buildpack API 0.7._
The `bom` array is deprecated.
```toml
[[bom]]
name = "<dependency name>"
[bom.metadata]
# arbitrary metadata describing the dependency
```
If the `bom` array is used, the buildpack:
- SHOULD add a bill-of-materials entry to the `bom` array describing each dependency contributed to the build environment, where:
- `name` is REQUIRED.
- `metadata` MAY contain additional data describing the dependency.
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.

View File

@ -1,109 +1,3 @@
# Bindings
# Bindings (DEPRECATED)
Bindings are exposed inside of a container during the detect, build, and launch phases of the lifecycle. The contents of bindings MUST NOT be part of the image created after the detect and build phases.
## Table of Contents
<!-- Using https://github.com/yzhang-gh/vscode-markdown to manage toc -->
- [Bindings](#bindings)
- [Table of Contents](#table-of-contents)
- [Detect and Build Phases](#detect-and-build-phases)
- [Metadata](#metadata)
- [Secret](#secret)
- [Example Directory Structure](#example-directory-structure)
- [Launch Phase](#launch-phase)
- [Metadata](#metadata-1)
- [Secret](#secret-1)
- [Example Directory Structure](#example-directory-structure-1)
## Detect and Build Phases
Before initiating the detect or build phases on the build-image, the platform MUST provide any bindings as files in `<platform>/bindings/<binding-name>` with directory names matching the name of the binding. Binding names MUST match `[a-z0-9\-\.]{1,253}`.
### Metadata
Within each binding directory the platform MUST provide a `metadata` directory containing `kind` and `provider` files. The value of the `kind` file MUST contain an abstract classification of the binding. The value of the `provider` file MUST identify the provider of this binding.
In addition to the required files, the `metadata` directory MAY contain additional metadata about the binding with file names and contents matching the metadata names and contents.
The collection of files within the directory MAY change between detect and build phase pairs. The collection of files within the directory MUST NOT change during the detect and build phase pair.
The contents of the files MAY change between detect and build phase pairs. The contents of the files MUST NOT change during the detect and build phase pair.
### Secret
Within each binding directory the platform MAY provide a `secret` directory containing the secret associated with the binding with filenames matching the secret key names.
During the detect and build phases, if the `secret` directory exists, the contents of the files MAY be one of the following:
* the values of the secret keys
* an indirect pointer to another system for value resolution
If the `secret` directory exists, the collection of files within the directory MAY change between detect and build phase pairs. The collection of files within the directory MUST NOT change during the detect and build phase pair.
If the `secret` directory exists, the contents of the files MAY change between detect and build phase pairs. The contents of the files MUST NOT change during the detect and build phase pair.
### Example Directory Structure
```plain
<platform>
└── bindings
├── primary-db
│ └── metadata
│ ├── connection-count
│ ├── kind
│ └── provider
└── secondary-db
├── metadata
│ ├── connection-count
│ ├── kind
│ └── provider
└── secret
├── endpoint
├── password
└── username
```
## Launch Phase
During the launch phase, the platform MUST provide any bindings as files in `$CNB_BINDINGS/<binding-name>` with directory names matching the name of the binding. Binding names MUST match `[a-z0-9\-\.]{1,253}`. The `CNB_BINDINGS` environment variable MUST be declared and can point to any valid filesystem location.
### Metadata
Within each binding directory the platform MUST provide a `metadata` directory containing `kind` and `provider` files. The value of the `kind` file MUST contain an abstract classification of the binding. The value of the `provider` file MUST identify the provider of this binding.
In addition to the required files, the `metadata` directory MAY contain additional metadata about the binding with file names and contents matching the metadata names and contents.
The collection of files within the directory MAY change between launches. The collection of files within the directory MUST NOT change during the launch phase.
The contents of the files MAY change between launches. The contents of the files MAY change during the launch phase.
### Secret
Within each binding directory the platform MUST provide a `secret` directory containing the secret associated with the binding with filenames matching the secret key names.
During the launch phase, the contents of the files MAY be one of the following:
* the values of the secret keys
* an indirect pointer to another system for value resolution
The collection of files within the directory MAY change between launches. The collection of files within the directory MUST NOT change during the launch phase.
The contents of the files MAY change between launches. The contents of the files MAY change during the launch phase.
### Example Directory Structure
```plain
custom-bindings-location
├── primary-db
│ ├── metadata
│ │ ├── connection-count
│ │ ├── kind
│ │ └── provider
│ └── secret
│ ├── endpoint
│ ├── password
│ └── username
└── secondary-db
├── metadata
│ ├── connection-count
│ ├── kind
│ └── provider
└── secret
├── endpoint
├── password
└── username
```
## NOTE - The CNB Bindings Spec has been deprecated in favor of https://github.com/servicebinding/spec

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

234
image_extension.md Normal file
View File

@ -0,0 +1,234 @@
# Image Extension Interface Specification
This document specifies the interface between a lifecycle program and one or more image extensions.
## Table of Contents
<!-- Using https://github.com/yzhang-gh/vscode-markdown to manage toc -->
- [Image Extension Interface Specification](#image-extension-interface-specification)
- [Table of Contents](#table-of-contents)
- [Image Extension API Version](#image-extension-api-version)
- [Image Extension Interface](#image-extension-interface)
- [Detection](#detection)
- [Generation](#generation)
- [Phase: Generation](#phase-generation)
- [Purpose](#purpose)
- [Process](#process)
- [Dockerfile Requirements](#dockerfile-requirements)
- [Data Format](#data-format)
- [Files](#files)
- [extension.toml (TOML)](#extensiontoml-toml)
## Image Extension API Version
This document accompanies Buildpack API version `0.10`.
## Image Extension Interface
Unless otherwise noted, image extensions are expected to conform to the [Buildpack Interface Specification](buildpack.md).
### Detection
Executable: `/bin/detect`, Working Dir: `<app[AR]>`
Image extensions participate in the buildpack [detection](buildpack.md#detection) process, with the same interface for `/bin/detect`. However:
- Detection is optional for image extensions, and they are assumed to pass detection when `/bin/detect` is not present.
- If an image extension is missing `/bin/detect`, the image extension root `/detect` directory MUST be treated as a pre-populated `<output>` directory.
- Instead of the `CNB_BUILDPACK_DIR` input, image extensions MUST receive a `CNB_EXTENSION_DIR` which MUST be the absolute path of the extension root directory.
- Image extensions MUST only output `provides` entries to the build plan. They MUST NOT output `requires`.
### Generation
Executable: `/bin/generate`, Working Dir: `<app[AR]>`
Image extensions participate in a generation process that is similar to the buildpack [build](buildpack.md#build) process, with an interface that is similar to `/bin/build`. However:
- Image extensions' `/bin/generate` MUST NOT write to the app directory.
- Instead of the `CNB_LAYERS_DIR` input, image extensions MUST receive a `CNB_OUTPUT_DIR` which MUST be the absolute path of an `<output>` directory and MUST NOT be the path of the buildpack layers directory.
- Instead of the `CNB_BUILDPACK_DIR` input, image extensions MUST receive a `CNB_EXTENSION_DIR` which MUST be the absolute path of the extension root directory.
- If an image extension is missing `/bin/generate`, the image extension root `/generate` directory MUST be treated as a pre-populated `<output>` directory.
## Phase: Generation
### Purpose
The purpose of the generation phase is to generate Dockerfiles that can be used to define the build and/or runtime base image. The generation phase MUST NOT be run for Windows builds.
### Process
**GIVEN:**
- The final ordered group of image extensions determined during the detection phase,
- A directory containing application source code,
- The Buildpack Plan,
- An `<output>` directory used to store generated artifacts,
- A shell, if needed,
For each image extension in the group in order, the lifecycle MUST execute `/bin/generate`.
1. **If** the exit status of `/bin/generate` is non-zero, \
**Then** the lifecycle MUST fail the build.
2. **If** the exit status of `/bin/generate` is zero,
1. **If** there are additional image extensions in the group, \
**Then** the lifecycle MUST proceed to the next image extension's `/bin/generate`.
2. **If** there are no additional image extensions in the group, \
**Then** the lifecycle MUST proceed to the build phase.
For each `/bin/generate` executable in each image extension, the lifecycle:
- MUST provide path arguments to `/bin/generate` as described in the [generation](#generation) section.
- MUST configure the build environment as described in the [Environment](buildpack.md#environment) section.
- MUST provide all `<plan>` entries that were required by any buildpack in the group during the detection phase with names matching the names that the image extension provided.
Correspondingly, each `/bin/generate` executable:
- MAY read from the `<app>` directory.
- MUST NOT write to the `<app>` directory.
- MAY read the build environment as described in the [Environment](buildpack.md#environment) section.
- MAY read the Buildpack Plan.
- 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 `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`
- MUST begin with:
```bash
ARG base_image
FROM ${base_image}
```
- 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
## Phase: Extension
### Purpose
The purpose of the extension phase is to apply the Dockerfiles generated in the generation phase to the appropriate base image. The extension phase MUST NOT be run for Windows builds.
### Process
**GIVEN:**
- The final ordered group of Dockerfiles generated during the generation phase,
- A list of build args for each Dockerfile specified during the generation phase,
For each Dockerfile in the group in order, the lifecycle MUST apply the Dockerfile to the base image as follows:
- The lifecycle MUST provide each Dockerfile with:
- A `base_image` build arg
- For the first Dockerfile, the value MUST be the original base image.
- 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
### Files
### extension.toml (TOML)
This section describes the 'Extension descriptor'.
```toml
api = "<buildpack API version>"
[extension]
id = "<extension ID>"
name = "<extension name>"
version = "<extension version>"
homepage = "<extension homepage>"
description = "<extension description>"
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 `[[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)
See the [Buildpack Interface Specification](buildpack.md).
### Buildpack Plan (TOML)
See the [Buildpack Interface Specification](buildpack.md). Image extensions MUST satisfy all entries in the Buildpack Plan.

15
img/genmatrix.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# A quick script to use tex.s2cms.ru to generate various matrix svgs.
# (requests were previously inlined directly from buildpack.md, this allows the doc to be read if the remote side is down)
wget -O matrix1.svg http://tex.s2cms.ru/svg/%0AO%20%3D%0A%5Cbegin%7Bbmatrix%7D%0AA%2C%20%26%20B%20%5C%5C%0AC%2C%20%26%20D%0A%5Cend%7Bbmatrix%7D%0A
wget -O matrix2.svg http://tex.s2cms.ru/svg/%0AP%20%3D%0A%5Cbegin%7Bbmatrix%7D%0AE%2C%20%26%20F%20%5C%5C%0AG%2C%20%26%20H%0A%5Cend%7Bbmatrix%7D%0A
wget -O matrix3.svg http://tex.s2cms.ru/svg/%0A%5Cbegin%7Bbmatrix%7D%0AE%2C%20%26%20O%2C%20%26%20F%0A%5Cend%7Bbmatrix%7D%20%3D%20%0A%5Cbegin%7Bbmatrix%7D%0AE%2C%20%26%20A%2C%20%26%20B%2C%20%26%20F%20%5C%5C%0AE%2C%20%26%20C%2C%20%26%20D%2C%20%26%20F%20%5C%5C%0A%5Cend%7Bbmatrix%7D%0A
wget -O matrix4.svg http://tex.s2cms.ru/svg/%0A%5Cbegin%7Bbmatrix%7D%0AO%2C%20%26%20P%0A%5Cend%7Bbmatrix%7D%20%3D%20%0A%5Cbegin%7Bbmatrix%7D%0AA%2C%20%26%20B%2C%20%26%20E%2C%20%26%20F%20%5C%5C%0AA%2C%20%26%20B%2C%20%26%20G%2C%20%26%20H%20%5C%5C%0AC%2C%20%26%20D%2C%20%26%20E%2C%20%26%20F%20%5C%5C%0AC%2C%20%26%20D%2C%20%26%20G%2C%20%26%20H%20%5C%5C%0A%5Cend%7Bbmatrix%7D%0A
# add background color.. (helps with github darkmode)
sed -i -e's/<svg/<svg style="background-color:white"/' matrix1.svg
sed -i -e's/<svg/<svg style="background-color:white"/' matrix2.svg
sed -i -e's/<svg/<svg style="background-color:white"/' matrix3.svg
sed -i -e's/<svg/<svg style="background-color:white"/' matrix4.svg

1
img/matrix1.svg Normal file
View File

@ -0,0 +1 @@
<svg style="background-color:white" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="105" height="44" viewBox="1872.02 1483.609 62.765 26.301"><defs><path id="g0-20" d="M2.727 25.735h2.87v-.6h-2.27V.164h2.27v-.6h-2.87v26.17z"/><path id="g0-21" d="M2.422 25.135H.152v.6h2.87V-.436H.152v.6h2.27v24.97z"/><path id="g2-61" d="M7.495-3.567c.163 0 .37 0 .37-.218s-.207-.219-.36-.219H.971c-.153 0-.36 0-.36.219s.207.218.37.218h6.514zm.01 2.116c.153 0 .36 0 .36-.218s-.207-.218-.37-.218H.982c-.164 0-.371 0-.371.218s.207.218.36.218h6.534z"/><path id="g1-59" d="M2.215-.01c0-.72-.273-1.146-.699-1.146a.561.561 0 00-.578.578c0 .294.218.578.578.578.131 0 .273-.044.382-.142.033-.022.044-.033.055-.033s.022.011.022.164c0 .807-.382 1.462-.742 1.822-.12.12-.12.142-.12.174 0 .077.054.12.109.12.12 0 .993-.84.993-2.116z"/><path id="g1-65" d="M1.953-1.255C1.516-.524 1.09-.37.61-.338c-.131.01-.23.01-.23.218 0 .065.055.12.143.12.294 0 .632-.033.938-.033.36 0 .742.033 1.09.033.066 0 .208 0 .208-.207 0-.12-.098-.131-.175-.131-.25-.022-.512-.11-.512-.382 0-.13.065-.25.152-.404l.83-1.396h2.738c.022.23.174 1.713.174 1.822 0 .327-.567.36-.785.36-.153 0-.262 0-.262.218 0 .12.13.12.153.12.447 0 .916-.033 1.363-.033.273 0 .96.033 1.233.033.066 0 .196 0 .196-.218 0-.12-.109-.12-.25-.12-.677 0-.677-.077-.71-.393L6.24-7.549c-.022-.218-.022-.262-.207-.262-.175 0-.218.076-.284.186l-3.796 6.37zm1.309-1.603l2.149-3.6.349 3.6H3.262z"/><path id="g1-66" d="M1.745-.85c-.109.425-.13.512-.992.512-.186 0-.295 0-.295.218 0 .12.098.12.295.12h3.894c1.724 0 3.011-1.287 3.011-2.356 0-.786-.633-1.419-1.69-1.539 1.134-.207 2.28-1.014 2.28-2.05 0-.808-.72-1.506-2.03-1.506H2.553c-.208 0-.317 0-.317.218 0 .12.099.12.306.12.022 0 .229 0 .414.022.197.022.295.033.295.175 0 .043-.011.076-.044.207L1.745-.851zm1.648-3.143l.676-2.705c.098-.382.12-.415.59-.415h1.406c.96 0 1.19.644 1.19 1.124 0 .96-.939 1.996-2.27 1.996H3.393zM2.902-.338c-.153 0-.175 0-.24-.011-.11-.011-.142-.022-.142-.11 0-.032 0-.054.055-.25l.752-3.044H5.39c1.047 0 1.255.808 1.255 1.277 0 1.08-.971 2.138-2.259 2.138H2.902z"/><path id="g1-67" d="M8.29-7.582a.11.11 0 00-.12-.109c-.032 0-.043.011-.163.131l-.763.84c-.099-.153-.6-.97-1.811-.97C3-7.69.545-5.28.545-2.75.545-.95 1.833.24 3.502.24c.949 0 1.778-.436 2.356-.938 1.015-.895 1.2-1.887 1.2-1.92 0-.11-.109-.11-.13-.11-.066 0-.12.023-.143.11-.098.316-.349 1.09-1.101 1.723-.753.611-1.44.797-2.008.797-.981 0-2.138-.567-2.138-2.27 0-.621.23-2.388 1.32-3.665.666-.774 1.691-1.32 2.662-1.32 1.113 0 1.756.84 1.756 2.106 0 .436-.032.447-.032.556s.12.11.163.11c.142 0 .142-.023.197-.219l.687-2.782z"/><path id="g1-68" d="M1.735-.85c-.11.425-.131.512-.993.512-.186 0-.306 0-.306.207C.436 0 .535 0 .742 0h3.61c2.27 0 4.419-2.302 4.419-4.69 0-1.54-.927-2.76-2.564-2.76H2.542c-.207 0-.327 0-.327.206 0 .131.098.131.316.131.142 0 .338.011.469.022.175.022.24.055.24.175 0 .043-.01.076-.044.207L1.735-.851zM4.09-6.699c.098-.382.12-.415.589-.415h1.167c1.07 0 1.975.578 1.975 2.018 0 .535-.218 2.324-1.146 3.524-.316.404-1.178 1.233-2.52 1.233H2.924c-.153 0-.175 0-.24-.011-.11-.011-.142-.022-.142-.11 0-.032 0-.054.054-.25L4.091-6.7z"/><path id="g1-79" d="M8.073-4.756c0-1.757-1.157-2.935-2.782-2.935C2.935-7.69.535-5.215.535-2.673.535-.862 1.756.24 3.327.24c2.313 0 4.746-2.39 4.746-4.996zM3.393-.044c-1.08 0-1.844-.883-1.844-2.323 0-.48.153-2.073.993-3.35.753-1.134 1.822-1.701 2.683-1.701.895 0 1.877.61 1.877 2.236 0 .786-.295 2.487-1.375 3.83C5.204-.688 4.31-.045 3.393-.045z"/></defs><g id="page1"><use x="1872.02" y="1499.492" xlink:href="#g1-79"/><use x="1883.674" y="1499.492" xlink:href="#g2-61"/><use x="1895.189" y="1484.11" xlink:href="#g0-20"/><use x="1900.947" y="1492.7" xlink:href="#g1-65"/><use x="1909.129" y="1492.7" xlink:href="#g1-59"/><use x="1922.378" y="1492.7" xlink:href="#g1-66"/><use x="1901.052" y="1506.249" xlink:href="#g1-67"/><use x="1909.024" y="1506.249" xlink:href="#g1-59"/><use x="1922.122" y="1506.249" xlink:href="#g1-68"/><use x="1931.457" y="1484.11" xlink:href="#g0-21"/></g><script type="text/ecmascript">if(window.parent.postMessage)window.parent.postMessage(&quot;13.07112|78.75|33|&quot;+window.location,&quot;*&quot;);</script></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

1
img/matrix2.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.6 KiB

1
img/matrix3.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.6 KiB

1
img/matrix4.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

File diff suppressed because it is too large Load Diff