diff --git a/text/0000-lifecycle-parallel-export.md b/text/0000-lifecycle-parallel-export.md index 523eafe18..b6fbd9bfe 100644 --- a/text/0000-lifecycle-parallel-export.md +++ b/text/0000-lifecycle-parallel-export.md @@ -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 @@ -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 | +|--------------|-----------------------|--------------|----------------------------------------------| +| `` | `CNB_PARALLEL_EXPORT` | `false` | Export app image and cache image in parallel | + # History [history]: #history