diff --git a/platform.md b/platform.md index 3f2d7ea0..0a680048 100644 --- a/platform.md +++ b/platform.md @@ -26,6 +26,7 @@ Examples of a platform might include: 5. [Data Format](#data-format) 1. [order.toml (TOML)](#order.toml-(toml)) 2. [group.toml (TOML)](#group.toml-(toml)) + 3. [project-metadata.toml (TOML)](#project-metadata.toml-(toml)) ## Stacks @@ -62,7 +63,7 @@ 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. - #### Detection phase +#### Detection phase 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. @@ -96,12 +97,12 @@ To initiate the export phase, the platform MUST invoke the `/cnb/lifecycle/expor Invoking this executable with no flags is equivalent to the following invocation including all accepted flags and their default values. ```bash -/cnb/lifecycle/exporter -source-metadata ./source-metadata.toml +/cnb/lifecycle/exporter -project-metadata ./project-metadata.toml ``` Where: -- `-source-metadata` MAY specify input from a `source-metadata.toml` file path as defined in the [Data Format](#data-format) section. +- `-project-metadata` MAY specify input from a `project-metadata.toml` file path as defined in the [Data Format](#data-format) section. ### Run Image @@ -139,7 +140,7 @@ The buildpacks directory MUST contain unarchived buildpacks such that: ## OCI Image The OCI image containing the compiled application is generated by the Build Image during the [Export Phase](#export-phase). -If the `/cnb/lifecycle/exporter` is invoked with the optional `-source-metadata` argument, the lifecycle MUST add a `io.buildpacks.project` image config label to the new OCI image with a [value as described in the data-format](#io.buildpacks.app.source-oci-image-label-json) section. +If the `/cnb/lifecycle/exporter` is invoked with the optional `-project-metadata` argument, the lifecycle MUST add a `io.buildpacks.project` image config label to the new OCI image. This label value is encoded JSON format of the `project-metadata.toml` contents, as described in the [data-format](#data-format) section. ## Security Considerations @@ -199,7 +200,7 @@ Where: - Both `id` and `version` MUST be present for each buildpack object in a group. -### source-metadata.toml (TOML) +### project-metadata.toml (TOML) ```toml [source] @@ -209,26 +210,4 @@ type = "" [source.metadata] -``` - -### io.buildpacks.project OCI Image label (JSON) -The value of this label: -- MUST be a string of escaped json complying with [RFC 8259](https://tools.ietf.org/html/rfc8259). -- when unescaped, MUST comply with the following schema: - -```json -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "source": { - "type": "object", - "properties":{ - "type": {"type": "string"}, - "version": {}, - "metadata": {} - } - } - } -} ``` \ No newline at end of file