Compare commits

...

13 Commits

Author SHA1 Message Date
Natalie Arellano d29ba81518
Merge pull request #413 from devigned/fix-image-ex-typo
fix typo to image extension link
2025-02-24 11:46:23 -05:00
David Justice bdcac26a7d
fix typo to image extension link
Signed-off-by: David Justice <david@devigned.com>
2024-12-09 14:55:38 -05:00
Natalie Arellano f3fd7555c8
Merge pull request #410 from buildpacks/platform/0.14
Finalize Platform 0.14
2024-07-17 09:48:52 -04:00
Natalie Arellano f8b60dc65c Update version
Signed-off-by: Natalie Arellano <narellano@vmware.com>
2024-07-09 12:36:55 -04:00
Natalie Arellano 08ee76ee4b
Merge pull request #408 from sap-contributions/add-run-flag-restorer
Add `-run` flag to the `restorer` binary
2024-07-09 12:33:20 -04:00
Pavel Busko 7f44395c97 clarify run image resolution during restore phase
Signed-off-by: Pavel Busko <pavel.busko@sap.com>
2024-07-04 12:30:56 +02:00
Pavel Busko 664e7a0eb3 Add -run flag to the restorer binary
Signed-off-by: Pavel Busko <pavel.busko@sap.com>
2024-07-03 12:32:39 +02:00
Natalie Arellano 7207c7dd71
Merge pull request #405 from ryanbrainard/patch-1
Close code fence
2024-04-19 09:53:47 -04:00
Ryan Brainard c995c549f7
Close code fence
Add closing backtick of code fence to fix rendering

Signed-off-by: Ryan Brainard <966764+ryanbrainard@users.noreply.github.com>
2024-04-18 10:20:47 -04:00
Natalie Arellano b341177441
Merge pull request #402 from edmorley/fix-distros.version-field-name
Correct name of `distros.version` field in `buildpack.toml`
2024-04-09 09:28:02 -04:00
Ed Morley 7c68e77461
Correct name of `distros.version` field in `buildpack.toml`
The correct name for the field is `distros.version` (singular), rather than
`distros.versions`.

The former is what is used elsewhere in the spec, and in the lifecycle
implementation.

The plural form looks like a leftover from the rename in:
8652ec5e49

Fixes #401.

Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
2024-04-08 16:15:33 +01:00
Natalie Arellano 87dc65b961
Merge pull request #397 from edmorley/patch-1
Correct specification for deprecated `CNB_STACK_ID`
2024-03-27 15:52:27 -04:00
Ed Morley 551833d3d1
Correct specification for deprecated `CNB_STACK_ID`
Restores the specification for `CNB_STACK_ID` to the definition that was used prior to the docs refactor in #335.

Fixes #396.

Signed-off-by: Ed Morley <501702+edmorley@users.noreply.github.com>
2024-03-27 16:39:42 +00:00
3 changed files with 16 additions and 10 deletions

View File

@ -52,4 +52,4 @@ These documents currently specify:
- Buildpack API: `0.10`
- Distribution API: `0.3`
- Platform API: `0.12`
- Platform API: `0.14`

View File

@ -103,7 +103,7 @@ A **component buildpack** is a buildpack containing `/bin/detect` and `/bin/buil
A **composite buildpack** is a buildpack containing an order definition in `buildpack.toml`. Composite buildpacks do not contain `/bin/detect` or `/bin/build` executables. They MUST be [resolvable](#order-resolution) into a collection of component buildpacks.
An **image extension** is a directory containing an `extension.toml`. Extensions generate Dockerfiles that can be used to define the runtime base image, prior to buildpack execution. Extensions implement the [Image Extension Interface](image-extension.md). Extensions are always "component": their `extension.toml` cannot contain an order definition.
An **image extension** is a directory containing an `extension.toml`. Extensions generate Dockerfiles that can be used to define the runtime base image, prior to buildpack execution. Extensions implement the [Image Extension Interface](image_extension.md). Extensions are always "component": their `extension.toml` cannot contain an order definition.
**Resolving an order** is the process by which an order (which may contain image extensions, component buildpacks, or composite buildpacks) is evaluated together with application source code to produce an optional group of image extensions and a required group of component buildpacks that can be used to build the application. This process is known as **detection**. During detection, the `/bin/detect` executable for each image extension (if present) and the `/bin/detect` executable for each component buildpack is invoked.
@ -1108,8 +1108,8 @@ Each target in `targets`:
- MUST identify a compatible runtime environment:
- `os`, `arch`, and `variant` if provided MUST be valid identifiers as defined in the [OCI Image Specification](https://github.com/opencontainers/image-spec/blob/main/config.md)
- `distros` if provided MUST describe the OS distributions supported by the buildpack
- For Linux-based images, `distros.name` and `distros.versions` SHOULD contain the values specified in `/etc/os-release` (`$ID` and `$VERSION_ID`), as the `os.version` field in an image config may contain combined distribution and version information
- For Windows-based images, `distros.name` SHOULD be empty; `distros.versions` SHOULD contain the value of `os.version` in the image config (e.g., `10.0.14393.1066`)
- For Linux-based images, `distros.name` and `distros.version` SHOULD contain the values specified in `/etc/os-release` (`$ID` and `$VERSION_ID`), as the `os.version` field in an image config may contain combined distribution and version information
- For Windows-based images, `distros.name` SHOULD be empty; `distros.version` SHOULD contain the value of `os.version` in the image config (e.g., `10.0.14393.1066`)
- Any field not provided will be interpreted as `<matches any>`
If the `targets` list is empty, tools reading `buildpack.toml` will assume:

View File

@ -98,7 +98,7 @@ Examples of a platform might include:
## Platform API Version
This document specifies Platform API version `0.12`.
This document specifies Platform API version `0.14`.
Platform API versions:
- MUST be in form `<major>.<minor>` or `<major>`, where `<major>` is equivalent to `<major>.0`
@ -479,7 +479,8 @@ Usage:
[-layers <layers>] \
[-log-level <log-level>] \
[-skip-layers <skip-layers>] \
[-uid <uid>]
[-uid <uid>] \
[-run <run> ]
```
##### Inputs
@ -499,11 +500,13 @@ Usage:
| `<log-level>` | `CNB_LOG_LEVEL` | `info` | Log Level |
| `<skip-layers>` | `CNB_SKIP_LAYERS` | `false` | Do not perform [layer restoration](#layer-restoration) |
| `<uid>` | `CNB_USER_ID` | | UID of the build image `User` |
| `<run>`** | `CNB_RUN_PATH` | `/cnb/run.toml` | Path to run file (see [`run.toml`](#runtoml-toml)) |
> ^ Only needed when using image extensions
> \* Only needed when using image extensions to extend the build image
> \** Only needed when using image extensions to extend the run image
##### Outputs
| Output | Description |
@ -533,7 +536,7 @@ Usage:
- MUST record the digest reference to the provided `<build-image>` in `<analyzed>`
- MUST copy the OCI manifest and config file for `<build-image>` to `<kaniko-dir>/cache`
- The lifecycle:
- MUST resolve `run-image.reference` to a digest reference in `<analyzed>` if not present
- MUST [resolve mirrors](#run-image-resolution) for the `run-image.reference` in `<analyzed>` and resolve it to a digest reference
- MUST populate `run-image.target` data in `<analyzed>` if not present
- **If** `<analyzed>` has `run-image.extend = true`, the lifecycle:
- MUST download from the registry and save in OCI layout format the `run-image` in `<analyzed>` to `<kaniko-dir>/cache`
@ -967,7 +970,7 @@ Usage:
- **If** `<force>` is `true` and the provided `<run-image>` is not found in `runImage.image` or `runImage.mirrors`:
- `run-image.image` SHALL be the provided `<run-image>`
- `run-image.mirrors` SHALL be omitted
- **Else if** `<force> is `false`, the provided `<run-image>` MUST be found in `runImage.image` or `runImage.mirrors`
- **Else if** `<force>` is `false`, the provided `<run-image>` MUST be found in `runImage.image` or `runImage.mirrors`
- To ensure [build reproducibility](#build-reproducibility), the lifecycle:
- SHOULD set the `created` time in image config to a constant
- The lifecycle SHALL write a [report](#reporttoml-toml) to `<report>` describing the rebased app image
@ -1570,10 +1573,13 @@ _Deprecated in Platform API 0.12._
For compatibility with older platforms and older buildpacks, base image authors SHOULD ensure for build images and run images:
- The image config's `Env` field has the environment variable `CNB_STACK_ID` set to the stack ID.
- 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.
And for build images:
- The image config's `Env` field has the environment variable `CNB_STACK_ID` set to the stack ID.
Where `CNB_STACK_ID` SHALL be directly inherited by buildpacks without modification.
To upgrade, the platform SHOULD upgrade all buildpacks to use Buildpack API `0.10` or greater.