From ff640ab6b953b25dafc8d256e69b8023eef28724 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Wed, 10 Mar 2021 12:56:12 -0500 Subject: [PATCH 1/3] 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 2/3] 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 3/3] 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=`