From 6529846ad260b9df224efdd5cbd741783a7ea204 Mon Sep 17 00:00:00 2001 From: Kashyap Vedurmudi <37810054+kvedurmu@users.noreply.github.com> Date: Thu, 18 Jun 2020 16:51:05 -0500 Subject: [PATCH 1/4] Updates platform spec for stack metadata RFC Signed-off-by: Kashyap Vedurmudi Signed-off-by: Kashyap Vedurmudi --- platform.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/platform.md b/platform.md index 46e363c9..5d316951 100644 --- a/platform.md +++ b/platform.md @@ -85,6 +85,18 @@ The platform MUST ensure that: - The image config's `Label` field has the label `io.buildpacks.stack.id` set to the stack ID. - The image config's `Label` field has the label `io.buildpacks.stack.mixins` set to a JSON array containing mixin names for each mixin applied to the image. +The platform SHOULD ensure that: + +- The image config's `Label` field has the label `io.buildpacks.stack.maintainer` set to the name of the stack maintainer. +- The image config's `Label` field has the label `io.buildpacks.stack.homepage` set to the homepage of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.distro.name` set to the name of the stack's OS distro. +- The image config's `Label` field has the label `io.buildpacks.stack.distro.version` set to the version of the stack's OS distro. +- The image config's `Label` field has the label `io.buildpacks.stack.version` set to the release number of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.release_date` set to the release date of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.description` set to the description of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.metadata` set to additional metadata related to the stack. + + To initiate the detection phase, the platform MUST invoke the `/cnb/lifecycle/detector` executable with the user and environment defined in the build image config. Invoking this executable with no flags is equivalent to the following invocation including all accepted flags and their default values. @@ -122,6 +134,17 @@ The platform MUST ensure that: - The image config's `Label` field has the label `io.buildpacks.stack.id` set to the stack ID. - The image config's `Label` field has the label `io.buildpacks.stack.mixins` set to a JSON array containing mixin names for each mixin applied to the image. +The platform SHOULD ensure that: + +- The image config's `Label` field has the label `io.buildpacks.stack.maintainer` set to the name of the stack maintainer. +- The image config's `Label` field has the label `io.buildpacks.stack.homepage` set to the homepage of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.distro.name` set to the name of the stack's OS distro. +- The image config's `Label` field has the label `io.buildpacks.stack.distro.version` set to the version of the stack's OS distro. +- The image config's `Label` field has the label `io.buildpacks.stack.version` set to the release number of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.release_date` set to the release date of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.description` set to the description of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.metadata` set to additional metadata related to the stack. + ### Mixins A mixin name MUST only be defined by the author of its corresponding stack. @@ -163,7 +186,9 @@ The lifecycle MUST NOT assume that all platforms provide an identical environmen Run image rebasing allows for fast stack updates for already-exported OCI images with minimal data transfer when those images are stored on a Docker registry. When a new stack version with the same stack ID is available, the app layers and launch layers SHOULD be rebased on the new run image by updating the image's configuration to point at the new run image. -Once the new run image is present on the registry, filesystem layers SHOULD NOT be uploaded or downloaded. +Once the new run image is present on the registry, filesystem layers SHOULD NOT be uploaded or downloaded. + +Rebasing MUST also ensure that the latest run image `io.buildpacks.stack.*` labels are updated on the app image. The new run image MUST have an identical stack ID and MUST include the exact same set of mixins. From 9ae1622fbed9ebf78b4adcfa1ef9dd0c82630a50 Mon Sep 17 00:00:00 2001 From: Kashyap Vedurmudi <37810054+kvedurmu@users.noreply.github.com> Date: Wed, 2 Sep 2020 09:37:23 -0400 Subject: [PATCH 2/4] Update platform.md Co-authored-by: Emily Casey Signed-off-by: Kashyap Vedurmudi --- platform.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.md b/platform.md index 5d316951..e8e1591e 100644 --- a/platform.md +++ b/platform.md @@ -91,7 +91,7 @@ The platform SHOULD ensure that: - The image config's `Label` field has the label `io.buildpacks.stack.homepage` set to the homepage of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.distro.name` set to the name of the stack's OS distro. - The image config's `Label` field has the label `io.buildpacks.stack.distro.version` set to the version of the stack's OS distro. -- The image config's `Label` field has the label `io.buildpacks.stack.version` set to the release number of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.version` set to the version of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.release_date` set to the release date of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.description` set to the description of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.metadata` set to additional metadata related to the stack. From ac4a479a4715df8aed9cad0be971f4fe55519afe Mon Sep 17 00:00:00 2001 From: Kashyap Vedurmudi <37810054+kvedurmu@users.noreply.github.com> Date: Wed, 2 Sep 2020 09:37:37 -0400 Subject: [PATCH 3/4] Update platform.md Co-authored-by: Emily Casey Signed-off-by: Kashyap Vedurmudi --- platform.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.md b/platform.md index e8e1591e..b1ea8d02 100644 --- a/platform.md +++ b/platform.md @@ -186,7 +186,7 @@ The lifecycle MUST NOT assume that all platforms provide an identical environmen Run image rebasing allows for fast stack updates for already-exported OCI images with minimal data transfer when those images are stored on a Docker registry. When a new stack version with the same stack ID is available, the app layers and launch layers SHOULD be rebased on the new run image by updating the image's configuration to point at the new run image. -Once the new run image is present on the registry, filesystem layers SHOULD NOT be uploaded or downloaded. +Once the new run image is present on the registry, filesystem layers SHOULD NOT be uploaded or downloaded. Rebasing MUST also ensure that the latest run image `io.buildpacks.stack.*` labels are updated on the app image. From 6132e81413d46e3c82bc362a2ec1ed291a27786d Mon Sep 17 00:00:00 2001 From: Kashyap Vedurmudi Date: Wed, 16 Sep 2020 18:21:39 -0400 Subject: [PATCH 4/4] renames release_date label to released and removes stack version label Signed-off-by: Kashyap Vedurmudi --- platform.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/platform.md b/platform.md index b1ea8d02..450d3f4f 100644 --- a/platform.md +++ b/platform.md @@ -91,8 +91,7 @@ The platform SHOULD ensure that: - The image config's `Label` field has the label `io.buildpacks.stack.homepage` set to the homepage of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.distro.name` set to the name of the stack's OS distro. - The image config's `Label` field has the label `io.buildpacks.stack.distro.version` set to the version of the stack's OS distro. -- The image config's `Label` field has the label `io.buildpacks.stack.version` set to the version of the stack. -- The image config's `Label` field has the label `io.buildpacks.stack.release_date` set to the release date of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.released` set to the release date of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.description` set to the description of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.metadata` set to additional metadata related to the stack. @@ -140,8 +139,7 @@ The platform SHOULD ensure that: - The image config's `Label` field has the label `io.buildpacks.stack.homepage` set to the homepage of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.distro.name` set to the name of the stack's OS distro. - The image config's `Label` field has the label `io.buildpacks.stack.distro.version` set to the version of the stack's OS distro. -- The image config's `Label` field has the label `io.buildpacks.stack.version` set to the release number of the stack. -- The image config's `Label` field has the label `io.buildpacks.stack.release_date` set to the release date of the stack. +- The image config's `Label` field has the label `io.buildpacks.stack.released` set to the release date of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.description` set to the description of the stack. - The image config's `Label` field has the label `io.buildpacks.stack.metadata` set to additional metadata related to the stack.