Skip to content

Commit

Permalink
API change declaration for this RFC
Browse files Browse the repository at this point in the history
Signed-off-by: Woa <me@wuzy.cn>
  • Loading branch information
ESWZY committed Sep 21, 2023
1 parent 0c01652 commit 051508b
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion text/0000-lifecycle-parallel-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,40 @@ func export() {
}
```

## Examples

For command line use, control this process through the `parallel` flag.

### Export both app image and cache image

By specifying environment variable `CNB_PARALLEL_EXPORT`, or pass a `-parallel` flag, images will be pushed to `cr1.example.com` and `cr2.example.com` simultaneously.

```shell
> export CNB_PARALLEL_EXPORT=true
> /cnb/lifecycle/exporter -app cr1.example.com/foo:app -cache-image cr2.example.com/foo:cache

# OR

> /cnb/lifecycle/exporter -app cr1.example.com/foo:app -cache-image cr2.example.com/foo:cache -parallel
```

### Export app image only or export cache image only

If export one image, the effect of this function is not very obvious.

```shell
> export CNB_PARALLEL_EXPORT=true
> /cnb/lifecycle/exporter -app cr1.example.com/foo:app

# OR

> /cnb/lifecycle/exporter -app cr1.example.com/foo:app -parallel

# EQUAL TO

> /cnb/lifecycle/exporter -app cr1.example.com/foo:app
```

# Migration
[migration]: #migration

Expand Down Expand Up @@ -117,7 +151,14 @@ N/A.
# Spec. Changes (OPTIONAL)
[spec-changes]: #spec-changes

N/A.
This new feature will affect the API of [Create](https://buildpacks.io/docs/concepts/components/lifecycle/create/) and [Export](https://buildpacks.io/docs/concepts/components/lifecycle/export/) phases, by adding the following fields.

Back to API changes, we will add a new flag to control this.

| Input | Environment Variable | DefaultValue | Description |
|--------------|-----------------------|--------------|----------------------------------------------|
| `<parallel>` | `CNB_PARALLEL_EXPORT` | `false` | Export app image and cache image in parallel |


# History
[history]: #history
Expand Down

0 comments on commit 051508b

Please sign in to comment.