From e089d5124fedb3afdc3bddfaf6302066cb4e6c96 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Tue, 18 Aug 2020 14:46:15 -0400 Subject: [PATCH 01/16] Exporter: when no default process is specified, don't set a default process (even when there is only one process) The lifecycle should be as transparent as possible and have no opinions. The current behavior could be surprising to some users. Signed-off-by: Natalie Arellano --- platform.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/platform.md b/platform.md index 53bc43e0..9f8e10b0 100644 --- a/platform.md +++ b/platform.md @@ -526,10 +526,7 @@ Usage: - **If** `` matches a buildpack-provided process: - MUST have `ENTRYPOINT=/cnb/process/` - **If** `` does not match a buildpack-provided process: - - **If** there is exactly one buildpack-provided process: - - MUST have `ENTRYPOINT=/cnb/process/` where `` matches the `type` of the process - - **Else**: - - MUST have `ENTRYPOINT` set to `/cnb/lifecycle/launcher` + - MUST have `ENTRYPOINT` set to `/cnb/lifecycle/launcher` - MUST contain the following `Env` entries - `CNB_LAYERS_DIR=` - `CNB_APP_DIR=` From 8e4cf129ec0983ea4521c54d9dbd2b05b44bea74 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Mon, 16 Nov 2020 15:54:08 -0500 Subject: [PATCH 02/16] Add build.bom.buildpack to report.toml The information included in the build BOM should have the same schema as the image BOM (io.buildpacks.build.metadata). Signed-off-by: Natalie Arellano --- platform.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform.md b/platform.md index 7482958c..704eb383 100644 --- a/platform.md +++ b/platform.md @@ -987,6 +987,10 @@ name = "" [build.bom.metadata] version = "" + +[build.bom.buildpack] +id = "" +version = "" ``` Where: - `tags` MUST contain all tag references to the exported app image From 0b02018f14f0ea2f89475c7a7ceb98f04c1a3b1c Mon Sep 17 00:00:00 2001 From: Micah Young Date: Fri, 27 Nov 2020 09:59:00 -0500 Subject: [PATCH 03/16] Fixes typo in platform spec Signed-off-by: Micah Young --- platform.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform.md b/platform.md index 7482958c..83031631 100644 --- a/platform.md +++ b/platform.md @@ -1064,8 +1064,8 @@ Where: - `buildpacks` MUST contain the detected group - `bom` MUST contain the Bill of Materials - `launcher.version` SHOULD contain the version of the `launcher` binary included in the app -- `luancher.source.git.repository` SHOULD contain the git repository containing the `launcher` source code -- `luancher.source.git.commit` SHOULD contain the git commit from which the given `launcher` was built +- `launcher.source.git.repository` SHOULD contain the git repository containing the `launcher` source code +- `launcher.source.git.commit` SHOULD contain the git commit from which the given `launcher` was built #### `io.buildpacks.lifecycle.metadata` (JSON) From c1373ac8e1707c8f14e915ba693ab5a980dab26a Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Mon, 4 Jan 2021 12:58:38 -0500 Subject: [PATCH 04/16] Clarify that cache image must be in a registry. Daemon cache images are not used due to performance reasons. This updates the analyzer description to be more specific (other phases already have the specific language). Signed-off-by: Natalie Arellano --- platform.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform.md b/platform.md index 088a8eed..042b5f39 100644 --- a/platform.md +++ b/platform.md @@ -348,8 +348,8 @@ Usage: | Input | Environment Variable | Default Value | Description |----------------|-----------------------|--------------------------|---------------------- | `` | `CNB_ANALYZED_PATH` | `/analyzed.toml` | Path to output analysis metadata (see [`analyzed.toml`](#analyzedtoml-toml) -| `` | `CNB_CACHE_DIR` | | Location of cache, provided as a directory -| ``| `CNB_CACHE_IMAGE` | | Location of cache, provided as an image +| `` | `CNB_CACHE_DIR` | | Path to a cache directory +| ``| `CNB_CACHE_IMAGE` | | Reference to a cache image in an OCI image registry | `` | `CNB_USE_DAEMON` | `false` | Analyze image from docker daemon | `` | `CNB_GROUP_ID` | | Primary GID of the stack `User` | `` | `CNB_GROUP_PATH` | `/group.toml` | Path to group definition (see [`group.toml`](#grouptoml-toml)) From 1a650df5a9515333c083e20c3ead845cd97e455c Mon Sep 17 00:00:00 2001 From: Yael Harel Date: Thu, 7 Jan 2021 16:21:59 -0500 Subject: [PATCH 05/16] Add Image Manifest Size to report.toml Signed-off-by: Yael Harel --- platform.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform.md b/platform.md index 042b5f39..b3882e4f 100644 --- a/platform.md +++ b/platform.md @@ -977,6 +977,7 @@ Where: tags = [""] digest = "" image-id = "" +manifest-size = "" [build] [[build.bom]] @@ -993,6 +994,7 @@ Where: - `tags` MUST contain all tag references to the exported app image - **If** the app image was exported to an OCI registry - `digest` MUST contain the image digest + - `manifest-size` MUST contain the manifest size in bytes - **If** the app image was exported to a docker daemon - `imageID` MUST contain the imageID - **If** the app image was the result of a build operation From 3b969cce321f46d364d20cafaae456de06b978eb Mon Sep 17 00:00:00 2001 From: Jesse Brown Date: Wed, 20 Jan 2021 22:40:04 -0600 Subject: [PATCH 06/16] Add /order.toml to path resolution Allowing `/order.toml` to resolve before a builder's `/cnb/order.toml` will let platforms control the buildpacks to be executed from inside the same pod. A platform may mount `` to a container that executes prior to `/cnb/detector` and can write an `order.toml` to be consumed by `/cnb/detector` without knowing anything about the builder to be used. Signed-off-by: Jesse Brown --- platform.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/platform.md b/platform.md index b3882e4f..ed4f5384 100644 --- a/platform.md +++ b/platform.md @@ -293,16 +293,16 @@ Usage: ``` ##### Inputs -| Input | Environment Variable | Default Value | Description -|---------------|-------------------------|---------------------------|---------------------- -| `` | `CNB_APP_DIR` | `/workspace` | Path to application directory -| `` | `CNB_BUILDPACKS_DIR` | `/cnb/buildpacks` | Path to buildpacks directory (see [Buildpacks Directory Layout](#buildpacks-directory-layout)) -| `` | `CNB_GROUP_PATH` | `/group.toml` | Path to output group definition -| `` | `CNB_LAYERS_DIR` | `/layers` | Path to layers directory -| `` | `CNB_LOG_LEVEL` | `info` | Log Level -| `` | `CNB_ORDER_PATH` | `/cnb/order.toml` | Path to order definition (see [`order.toml`](#ordertoml-toml)) -| `` | `CNB_PLAN_PATH` | `/plan.toml` | Path to output resolved build plan -| `` | `CNB_PLATFORM_DIR` | `/platform` | Path to platform directory +| Input | Environment Variable | Default Value | Description +|---------------|-------------------------|------------------------------------------|------- +| `` | `CNB_APP_DIR` | `/workspace` | Path to application directory +| `` | `CNB_BUILDPACKS_DIR` | `/cnb/buildpacks` | Path to buildpacks directory (see [Buildpacks Directory Layout](#buildpacks-directory-layout)) +| `` | `CNB_GROUP_PATH` | `/group.toml` | Path to output group definition +| `` | `CNB_LAYERS_DIR` | `/layers` | Path to layers directory +| `` | `CNB_LOG_LEVEL` | `info` | Log Level +| `` | `CNB_ORDER_PATH` | `/order.toml`, `/cnb/order.toml` | Path to order definition (see [`order.toml`](#ordertoml-toml)) +| `` | `CNB_PLAN_PATH` | `/plan.toml` | Path to output resolved build plan +| `` | `CNB_PLATFORM_DIR` | `/platform` | Path to platform directory ##### Outputs | Output | Description From 076c07ca7c31e8467481c1d416361932dc609b11 Mon Sep 17 00:00:00 2001 From: Jesse Brown Date: Wed, 27 Jan 2021 13:00:56 -0600 Subject: [PATCH 07/16] Update platform.md Signed-off-by: Jesse Brown Co-authored-by: Terence Lee --- platform.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.md b/platform.md index ed4f5384..056c58a8 100644 --- a/platform.md +++ b/platform.md @@ -300,7 +300,7 @@ Usage: | `` | `CNB_GROUP_PATH` | `/group.toml` | Path to output group definition | `` | `CNB_LAYERS_DIR` | `/layers` | Path to layers directory | `` | `CNB_LOG_LEVEL` | `info` | Log Level -| `` | `CNB_ORDER_PATH` | `/order.toml`, `/cnb/order.toml` | Path to order definition (see [`order.toml`](#ordertoml-toml)) +| `` | `CNB_ORDER_PATH` | `/order.toml`:`/cnb/order.toml` | Path resolution for order definition (see [`order.toml`](#ordertoml-toml)) | `` | `CNB_PLAN_PATH` | `/plan.toml` | Path to output resolved build plan | `` | `CNB_PLATFORM_DIR` | `/platform` | Path to platform directory From 94370afe200003b56d2e164d5280c9ced0c82134 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Thu, 4 Feb 2021 15:40:59 -0500 Subject: [PATCH 08/16] Set working directory to CNB_APP_DIR Signed-off-by: Natalie Arellano --- platform.md | 1 + 1 file changed, 1 insertion(+) diff --git a/platform.md b/platform.md index b3882e4f..6244459c 100644 --- a/platform.md +++ b/platform.md @@ -579,6 +579,7 @@ Usage: - `CNB_LAYERS_DIR=` - `CNB_APP_DIR=` - `PATH=/cnb/process:$PATH` where `$PATH` is the value of `$PATH` on the run-image. + - MUST have the working directory set to the value of `$CNB_APP_DIR`. - MUST contain the following labels - `io.buildpacks.lifecycle.metadata`: see [lifecycle metadata label](#iobuildpackslifecyclemetadata-json) - `io.buildpacks.project.metadata`: the value of which SHALL be the json representation `` From 6bbf83b53b18ef664f3d84bb0c252df2190ac2ea Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Thu, 4 Feb 2021 15:42:14 -0500 Subject: [PATCH 09/16] Clarify that launcher or symlink is the entrypoint Signed-off-by: Natalie Arellano --- platform.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.md b/platform.md index b3882e4f..26eff44f 100644 --- a/platform.md +++ b/platform.md @@ -267,7 +267,7 @@ To rebase an app image a platform MUST execute the `/cnb/lifecycle/rebaser` or p #### Launch `/cnb/lifecycle/launcher` is responsible for launching user and buildpack provided processes in the correct execution environment. -`/cnb/lifecycle/launcher` SHALL be the `ENTRYPOINT` for all app images. +`/cnb/lifecycle/launcher`, or a symlink to it (see [exporter outputs](#outputs-4)), SHALL be the `ENTRYPOINT` for all app images. ### Usage From 3f55053774959fdf6d873ea356604765c274943b Mon Sep 17 00:00:00 2001 From: Jesse Brown Date: Wed, 10 Feb 2021 12:21:12 -0600 Subject: [PATCH 10/16] Update wording around resolution of order.toml Signed-off-by: Jesse Brown --- platform.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/platform.md b/platform.md index 056c58a8..73dccdc8 100644 --- a/platform.md +++ b/platform.md @@ -293,16 +293,16 @@ Usage: ``` ##### Inputs -| Input | Environment Variable | Default Value | Description -|---------------|-------------------------|------------------------------------------|------- -| `` | `CNB_APP_DIR` | `/workspace` | Path to application directory -| `` | `CNB_BUILDPACKS_DIR` | `/cnb/buildpacks` | Path to buildpacks directory (see [Buildpacks Directory Layout](#buildpacks-directory-layout)) -| `` | `CNB_GROUP_PATH` | `/group.toml` | Path to output group definition -| `` | `CNB_LAYERS_DIR` | `/layers` | Path to layers directory -| `` | `CNB_LOG_LEVEL` | `info` | Log Level -| `` | `CNB_ORDER_PATH` | `/order.toml`:`/cnb/order.toml` | Path resolution for order definition (see [`order.toml`](#ordertoml-toml)) -| `` | `CNB_PLAN_PATH` | `/plan.toml` | Path to output resolved build plan -| `` | `CNB_PLATFORM_DIR` | `/platform` | Path to platform directory +| Input | Environment Variable | Default Value | Description +|---------------|-------------------------|--------------------------------------------------------|------- +| `` | `CNB_APP_DIR` | `/workspace` | Path to application directory +| `` | `CNB_BUILDPACKS_DIR` | `/cnb/buildpacks` | Path to buildpacks directory (see [Buildpacks Directory Layout](#buildpacks-directory-layout)) +| `` | `CNB_GROUP_PATH` | `/group.toml` | Path to output group definition +| `` | `CNB_LAYERS_DIR` | `/layers` | Path to layers directory +| `` | `CNB_LOG_LEVEL` | `info` | Log Level +| `` | `CNB_ORDER_PATH` | `/order.toml` if present, or `/cnb/order.toml` | Path resolution for order definition (see [`order.toml`](#ordertoml-toml)) +| `` | `CNB_PLAN_PATH` | `/plan.toml` | Path to output resolved build plan +| `` | `CNB_PLATFORM_DIR` | `/platform` | Path to platform directory ##### Outputs | Output | Description From 75ee979ea57b29487b6b676c71b0cc10fc5dfb2a Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Thu, 18 Feb 2021 15:48:06 -0500 Subject: [PATCH 11/16] Update per review comment Signed-off-by: Natalie Arellano --- platform.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.md b/platform.md index 6244459c..8f2a1301 100644 --- a/platform.md +++ b/platform.md @@ -579,7 +579,7 @@ Usage: - `CNB_LAYERS_DIR=` - `CNB_APP_DIR=` - `PATH=/cnb/process:$PATH` where `$PATH` is the value of `$PATH` on the run-image. - - MUST have the working directory set to the value of `$CNB_APP_DIR`. + - MUST have the working directory set to the value of ``. - MUST contain the following labels - `io.buildpacks.lifecycle.metadata`: see [lifecycle metadata label](#iobuildpackslifecyclemetadata-json) - `io.buildpacks.project.metadata`: the value of which SHALL be the json representation `` From 87a3fabf5bcfe10748d1469c8858d532790fc1ee Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Tue, 23 Feb 2021 17:03:15 -0500 Subject: [PATCH 12/16] New ranges for lifecycle exit codes Signed-off-by: Natalie Arellano --- platform.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/platform.md b/platform.md index 26eff44f..50b37b41 100644 --- a/platform.md +++ b/platform.md @@ -318,7 +318,7 @@ Usage: | `0` | Success | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error -| `1-10`, `13-99` | Generic lifecycle errors +| `1-10`, `13-19` | Generic lifecycle errors | `100` | All buildpacks groups have failed to detect w/o error | `101` | All buildpack groups have failed to detect and at least one buildpack has errored | `102-199` | Detection-specific lifecycle errors @@ -378,8 +378,8 @@ Usage: | `0` | Success | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error -| `1-10`, `13-99` | Generic lifecycle errors -| `200-299` | Analysis-specific lifecycle errors +| `1-10`, `13-19` | Generic lifecycle errors +| `40-59` | Analysis-specific lifecycle errors - The lifecycle MUST write [analysis metadata](#analyzedtoml-toml) to `` if `` is accessible. - **If** `` is `true` the lifecycle MUST NOT perform layer analysis. @@ -435,8 +435,8 @@ Usage: | `0` | Success | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error -| `1-10`, `13-99` | Generic lifecycle errors -| `300-399` | Restoration-specific lifecycle errors +| `1-10`, `13-19` | Generic lifecycle errors +| `60-79` | Restoration-specific lifecycle errors ##### Layer restoration For each layer metadata file found in the `` directory, the lifecycle: @@ -484,7 +484,7 @@ Usage: | `0` | Success | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error -| `1-10`, `13-99` | Generic lifecycle errors +| `1-10`, `13-19` | Generic lifecycle errors | `401` | Buildpack build error | `400`, `402-499`| Build-specific lifecycle errors @@ -557,8 +557,8 @@ Usage: | `0` | Success | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error -| `1-10`, `13-99` | Generic lifecycle errors -| `500-599`| Export-specific lifecycle errors +| `1-10`, `13-19` | Generic lifecycle errors +| `100-119`| Export-specific lifecycle errors - The lifecycle SHALL write the same app image to each `` tag - The app image: @@ -643,12 +643,12 @@ Outputs produced by `creator` are identical to those produced by `exporter`, wit | `0` | Success | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error -| `1-10`, `13-99` | Generic lifecycle errors -| `100-199`| Detection-specific lifecycle errors -| `200-299`| Analysis-specific lifecycle errors -| `300-399`| Restoration-specific lifecycle errors -| `400-499`| Build-specific lifecycle errors -| `500-599`| Export-specific lifecycle errors +| `1-10`, `13-19` | Generic lifecycle errors +| `20-39`| Detection-specific lifecycle errors +| `40-59`| Analysis-specific lifecycle errors +| `60-79`| Restoration-specific lifecycle errors +| `80-99`| Build-specific lifecycle errors +| `100-119`| Export-specific lifecycle errors #### `rebaser` @@ -693,8 +693,8 @@ Usage: | `0` | Success | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error -| `1-10`, `13-99` | Generic lifecycle errors -| `600-699`| Rebase-specific lifecycle errors +| `1-10`, `13-19` | Generic lifecycle errors +| `180-199`| Rebase-specific lifecycle errors - The lifecycle SHALL write the same app image to each `` tag - The rebased app image SHALL be identical to ``, with the following modifications: @@ -754,7 +754,7 @@ If the launcher errors before executing the process it will have one of the foll |-----------|-------| | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error -| `700-799`| Launch-specific lifecycle errors +| `200-219`| Launch-specific lifecycle errors Otherwise, the exit code shall be the exit code of the launched process. From 9cf6c1d9cf21601ce76bdab12ba0c887174bd1ac Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Thu, 25 Feb 2021 11:14:42 -0500 Subject: [PATCH 13/16] Update ranges Signed-off-by: Natalie Arellano --- platform.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/platform.md b/platform.md index 50b37b41..0929c857 100644 --- a/platform.md +++ b/platform.md @@ -319,9 +319,9 @@ Usage: | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error | `1-10`, `13-19` | Generic lifecycle errors -| `100` | All buildpacks groups have failed to detect w/o error -| `101` | All buildpack groups have failed to detect and at least one buildpack has errored -| `102-199` | Detection-specific lifecycle errors +| `20` | All buildpacks groups have failed to detect w/o error +| `21` | All buildpack groups have failed to detect and at least one buildpack has errored +| `22-29` | Detection-specific lifecycle errors The lifecycle: - SHALL detect a single group from `` and write it to `` using the [detection process](buildpack.md#phase-1-detection) outlined in the Buildpack Interface Specification @@ -379,7 +379,7 @@ Usage: | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error | `1-10`, `13-19` | Generic lifecycle errors -| `40-59` | Analysis-specific lifecycle errors +| `30-39` | Analysis-specific lifecycle errors - The lifecycle MUST write [analysis metadata](#analyzedtoml-toml) to `` if `` is accessible. - **If** `` is `true` the lifecycle MUST NOT perform layer analysis. @@ -436,7 +436,7 @@ Usage: | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error | `1-10`, `13-19` | Generic lifecycle errors -| `60-79` | Restoration-specific lifecycle errors +| `40-49` | Restoration-specific lifecycle errors ##### Layer restoration For each layer metadata file found in the `` directory, the lifecycle: @@ -485,8 +485,8 @@ Usage: | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error | `1-10`, `13-19` | Generic lifecycle errors -| `401` | Buildpack build error -| `400`, `402-499`| Build-specific lifecycle errors +| `51` | Buildpack build error +| `50`, `52-59`| Build-specific lifecycle errors - The lifecycle SHALL execute all buildpacks in the order defined in `` according process outlined in the [Buildpack Interface Specification](buildpack.md). - The lifecycle SHALL add all invoked buildpacks to`/config/metadata.toml`. @@ -558,7 +558,7 @@ Usage: | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error | `1-10`, `13-19` | Generic lifecycle errors -| `100-119`| Export-specific lifecycle errors +| `60-69`| Export-specific lifecycle errors - The lifecycle SHALL write the same app image to each `` tag - The app image: @@ -644,11 +644,11 @@ Outputs produced by `creator` are identical to those produced by `exporter`, wit | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error | `1-10`, `13-19` | Generic lifecycle errors -| `20-39`| Detection-specific lifecycle errors -| `40-59`| Analysis-specific lifecycle errors -| `60-79`| Restoration-specific lifecycle errors -| `80-99`| Build-specific lifecycle errors -| `100-119`| Export-specific lifecycle errors +| `20-29`| Detection-specific lifecycle errors +| `30-39`| Analysis-specific lifecycle errors +| `40-49`| Restoration-specific lifecycle errors +| `50-59`| Build-specific lifecycle errors +| `60-69`| Export-specific lifecycle errors #### `rebaser` @@ -694,7 +694,7 @@ Usage: | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error | `1-10`, `13-19` | Generic lifecycle errors -| `180-199`| Rebase-specific lifecycle errors +| `70-79`| Rebase-specific lifecycle errors - The lifecycle SHALL write the same app image to each `` tag - The rebased app image SHALL be identical to ``, with the following modifications: @@ -754,7 +754,7 @@ If the launcher errors before executing the process it will have one of the foll |-----------|-------| | `11` | Platform API incompatibility error | `12` | Buildpack API incompatibility error -| `200-219`| Launch-specific lifecycle errors +| `80-89`| Launch-specific lifecycle errors Otherwise, the exit code shall be the exit code of the launched process. From ff640ab6b953b25dafc8d256e69b8023eef28724 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Wed, 10 Mar 2021 12:56:12 -0500 Subject: [PATCH 14/16] Assume web is the default for older buildpacks Signed-off-by: Natalie Arellano --- platform.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/platform.md b/platform.md index 30cc8189..980011cf 100644 --- a/platform.md +++ b/platform.md @@ -488,9 +488,11 @@ Usage: | `401` | Buildpack build error | `400`, `402-499`| Build-specific lifecycle errors -- The lifecycle SHALL execute all buildpacks in the order defined in `` according process outlined in the [Buildpack Interface Specification](buildpack.md). +- The lifecycle SHALL execute all buildpacks in the order defined in `` according to the process outlined in the [Buildpack Interface Specification](buildpack.md). - The lifecycle SHALL add all invoked buildpacks to`/config/metadata.toml`. - The lifecycle SHALL aggregate all `processes`, `slices` and BOM entries returned by buildpacks in `/config/metadata.toml`. +- The lifecycle SHALL record the buildpack-provided default process type in `/config/metadata.toml`. + - The lifecycle SHALL treat `web` processes defined by buildpacks implementing buildpack API < 0.6 as `default = true`. #### `exporter` Usage: @@ -573,8 +575,10 @@ Usage: - MUST contain a layer that includes `/config/metadata.toml` - **If** `` matches a buildpack-provided process: - MUST have `ENTRYPOINT=/cnb/process/` - - **If** `` does not match a buildpack-provided process: - - MUST have `ENTRYPOINT` set to `/cnb/lifecycle/launcher` + - **Else if** `` does not match a buildpack-provided process: + - MUST fail + - **Else if** there is a buildpack-provided default process type in [`metadata.toml`](#metadatatoml-toml): + - MUST have `ENTRYPOINT=/cnb/process/` - MUST contain the following `Env` entries - `CNB_LAYERS_DIR=` - `CNB_APP_DIR=` @@ -893,6 +897,8 @@ Where: #### `metadata.toml` (TOML) ```toml +buildpack-default-process-type = "" + [[buildpacks]] id = "" version = "" @@ -1085,7 +1091,7 @@ Where: }, "buildpacks": [ { - "key": "", + "key": "", "version": "", "layers": { "": { From 2f8d463b32972d7ff2615ed0efcee41482de2b28 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Wed, 10 Mar 2021 13:00:59 -0500 Subject: [PATCH 15/16] Use full path to metadata.toml Signed-off-by: Natalie Arellano --- platform.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.md b/platform.md index 980011cf..dcde339d 100644 --- a/platform.md +++ b/platform.md @@ -577,7 +577,7 @@ Usage: - MUST have `ENTRYPOINT=/cnb/process/` - **Else if** `` does not match a buildpack-provided process: - MUST fail - - **Else if** there is a buildpack-provided default process type in [`metadata.toml`](#metadatatoml-toml): + - **Else if** there is a buildpack-provided default process type in `/config/metadata.toml`: - MUST have `ENTRYPOINT=/cnb/process/` - MUST contain the following `Env` entries - `CNB_LAYERS_DIR=` From f226345aeb342b04990820ced1d96904c0200c56 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Wed, 10 Mar 2021 16:54:34 -0500 Subject: [PATCH 16/16] Add else Signed-off-by: Natalie Arellano --- platform.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform.md b/platform.md index dcde339d..cfa0e166 100644 --- a/platform.md +++ b/platform.md @@ -575,10 +575,12 @@ Usage: - MUST contain a layer that includes `/config/metadata.toml` - **If** `` matches a buildpack-provided process: - MUST have `ENTRYPOINT=/cnb/process/` - - **Else if** `` does not match a buildpack-provided process: + - **Else if** `` is provided and does not match a buildpack-provided process: - MUST fail - **Else if** there is a buildpack-provided default process type in `/config/metadata.toml`: - MUST have `ENTRYPOINT=/cnb/process/` + - **Else**: + - MUST have `ENTRYPOINT` set to `/cnb/lifecycle/launcher` - MUST contain the following `Env` entries - `CNB_LAYERS_DIR=` - `CNB_APP_DIR=`