Skip to content

Commit

Permalink
RFC0013: renames source-metadata to project-metadata
Browse files Browse the repository at this point in the history
* follows comments received on PR
** remove whitespace
** add section to Table of Contents
** Renames `source-metadata` to `project-metadata`

[#170205764]

Signed-off-by: Carlo Colombo <ccolombo@pivotal.io>
  • Loading branch information
iainsproat authored and carlo-colombo committed Dec 17, 2019
1 parent 6b6d495 commit c1f1c74
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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]
Expand All @@ -209,26 +210,4 @@ type = "<source 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": {}
}
}
}
}
```

0 comments on commit c1f1c74

Please sign in to comment.