Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify: <kaniko-dir> is an input to the extender #329

Merged
merged 1 commit into from
Nov 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 27 additions & 26 deletions platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,19 +446,19 @@ Usage:
```

##### Inputs
| Input | Environment Variable | Default Value | Description |
|-----------------|----------------------|--------------------------|-----------------------------------------------------------------------------|
| `<analyzed>` | `CNB_ANALYZED_PATH` | `<layers>/analyzed.toml` | Path to output analysis metadata (see [`analyzed.toml`](#analyzedtoml-toml) |
| `<build-image>` | `CNB_BUILD_IMAGE` | | Reference to the current build image in an OCI registry (if used `<kaniko-dir>` must be provided) |
| `<cache-dir>` | `CNB_CACHE_DIR` | | Path to a cache directory |
| `<cache-image>` | `CNB_CACHE_IMAGE` | | Reference to a cache image in an OCI registry |
| `<gid>` | `CNB_GROUP_ID` | | Primary GID of the build image `User` |
| `<group>` | `CNB_GROUP_PATH` | `<layers>/group.toml` | Path to group definition (see [`group.toml`](#grouptoml-toml)) |
| `<layers>` | `CNB_LAYERS_DIR` | `/layers` | Path to layers directory |
| `<log-level>` | `CNB_LOG_LEVEL` | `info` | Log Level |
| `<uid>` | `CNB_USER_ID` | | UID of the build image `User` |
| `<skip-layers>` | `CNB_SKIP_LAYERS` | `false` | Do not perform [layer restoration](#layer-restoration) |
|`<kaniko-dir>`| | | Kaniko directory (must be `/kaniko`) |
| Input | Environment Variable | Default Value | Description |
|-----------------|----------------------|--------------------------|---------------------------------------------------------------------------------------------------|
| `<analyzed>` | `CNB_ANALYZED_PATH` | `<layers>/analyzed.toml` | Path to output analysis metadata (see [`analyzed.toml`](#analyzedtoml-toml) |
| `<build-image>` | `CNB_BUILD_IMAGE` | | Reference to the current build image in an OCI registry (if used `<kaniko-dir>` must be provided) |
| `<cache-dir>` | `CNB_CACHE_DIR` | | Path to a cache directory |
| `<cache-image>` | `CNB_CACHE_IMAGE` | | Reference to a cache image in an OCI registry |
| `<gid>` | `CNB_GROUP_ID` | | Primary GID of the build image `User` |
| `<group>` | `CNB_GROUP_PATH` | `<layers>/group.toml` | Path to group definition (see [`group.toml`](#grouptoml-toml)) |
| `<kaniko-dir>` | | | Kaniko directory (must be `/kaniko`) |
| `<layers>` | `CNB_LAYERS_DIR` | `/layers` | Path to layers directory |
| `<log-level>` | `CNB_LOG_LEVEL` | `info` | Log Level |
| `<uid>` | `CNB_USER_ID` | | UID of the build image `User` |
| `<skip-layers>` | `CNB_SKIP_LAYERS` | `false` | Do not perform [layer restoration](#layer-restoration) |

##### Outputs
| Output | Description |
Expand All @@ -470,16 +470,16 @@ Usage:
| `<layers>/<buidpack-id>/<layer>.toml` | Files containing the layer content metadata of each analyzed layer (see data format in [Buildpack Interface Specification](buildpack.md)) |
| `<layers>/<buidpack-id>/<layer>.sbom.<ext>` | Files containing the Software Bill of Materials for each analyzed layer (see [Buildpack Interface Specification](buildpack.md)) |
| `<layers>/<buidpack-id>/<layer>/*`. | Restored layer contents |
| `<kaniko-dir>/cache` | Kaniko cache contents |
| `<kaniko-dir>/cache` | Kaniko cache contents |


| Exit Code | Result|
|-----------------|-------|
| `0` | Success
| `11` | Platform API incompatibility error
| `12` | Buildpack API incompatibility error
| `1-10`, `13-19` | Generic lifecycle errors
| `40-49` | Restoration-specific lifecycle errors
| Exit Code | Result |
|-----------------|---------------------------------------|
| `0` | Success |
| `11` | Platform API incompatibility error |
| `12` | Buildpack API incompatibility error |
| `1-10`, `13-19` | Generic lifecycle errors |
| `40-49` | Restoration-specific lifecycle errors |

- For each buildpack in `<group>`, if persistent metadata for that buildpack exists in the analysis metadata, lifecycle MUST write a toml representation of the persistent metadata to `<layers>/<buildpack-id>/store.toml`
- **If** `<skip-layers>` is `true` the lifecycle MUST NOT perform layer restoration.
Expand Down Expand Up @@ -519,6 +519,7 @@ Usage:
| `<gid>` | `CNB_GROUP_ID` | | Primary GID of the build image `User` |
| `<group>` | `CNB_GROUP_PATH` | `<layers>/group.toml` | Path to group definition (see [`group.toml`](#grouptoml-toml)) |
| `<kaniko-cache-ttl>` | `CNB_KANIKO_CACHE_TTL` | 2 weeks | Kaniko cache TTL |
| `<kaniko-dir>` | | | Kaniko directory (must be `/kaniko`) |
sambhav marked this conversation as resolved.
Show resolved Hide resolved
| `<layers>` | `CNB_LAYERS_DIR` | `/layers` | Path to layers directory |
| `<log-level>` | `CNB_LOG_LEVEL` | `info` | Log Level |
| `<plan>` | `CNB_PLAN_PATH` | `<layers>/plan.toml` | Path to resolved build plan (see [`plan.toml`](#plantoml-toml)) |
Expand All @@ -529,11 +530,11 @@ Usage:

In addition to the outputs enumerated below, outputs produced by `extender` include those produced by `builder` - as the lifecycle will run the `build` phase after extending the build image. When using the `extender` platforms MUST skip the `builder` and proceed to the `exporter`.

| Output | Description |
|-----------------|----------------------------------------|
| [exit status] | (see Exit Code table below for values) |
| `/dev/stdout` | Logs (info) |
| `/dev/stderr` | Logs (warnings, errors) |
| Output | Description |
|----------------------|----------------------------------------|
| [exit status] | (see Exit Code table below for values) |
| `/dev/stdout` | Logs (info) |
| `/dev/stderr` | Logs (warnings, errors) |
| `<kaniko-dir>/cache` | Kaniko cache contents |

| Exit Code | Result |
Expand Down