From ff529207c1e115f157feda4860eb4b08b5f9c570 Mon Sep 17 00:00:00 2001 From: Sai Kiran Maggidi <107541780+WYGIN@users.noreply.github.com> Date: Wed, 25 Oct 2023 21:38:32 +0530 Subject: [PATCH 1/3] added docs for new build.env table Signed-off-by: Sai Kiran Maggidi <107541780+WYGIN@users.noreply.github.com> --- content/docs/reference/config/builder-config.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/docs/reference/config/builder-config.md b/content/docs/reference/config/builder-config.md index 494dda0f7..8b0abb6b2 100644 --- a/content/docs/reference/config/builder-config.md +++ b/content/docs/reference/config/builder-config.md @@ -73,6 +73,15 @@ A [builder][builder] configuration schema is as follows: > at the time of `pack`'s release. In other words, for a particular version of `pack`, this default > will not change despite new lifecycle versions being released. +- #### `build.env` _(optional)_ + The [[build.env]] is used to override platform environment variables at build-time. use Env `CNB_BUILD_CONFIG_DIR` to override when building image from cli to change default(`/cnb/build-config`) directory of these build-time environment variables stored + + - **`name`** _(string, required)_\ + The Name/Key of the Environment Variable. If Platform Environment Variable key/name is specified, then it is overridden at build-time else it will create a build-time environment variable with the given `name` that is not defined(key/name doesn't exists) at runtime of the container + + - **`value`** _(string, required)_\ + The value of the given name/key of the Environment Variable overriden to + ### Supported archives Currently, when specifying a URI to a buildpack or lifecycle, only `tar` or `tgz` archive types are supported. From 5dcb5935ba94f4647cc1f8ad668c24db7f3679a6 Mon Sep 17 00:00:00 2001 From: WYGIN Date: Thu, 26 Oct 2023 10:25:40 +0530 Subject: [PATCH 2/3] improved docs on build.env Signed-off-by: WYGIN --- content/docs/reference/config/builder-config.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/content/docs/reference/config/builder-config.md b/content/docs/reference/config/builder-config.md index 8b0abb6b2..18bd86e69 100644 --- a/content/docs/reference/config/builder-config.md +++ b/content/docs/reference/config/builder-config.md @@ -74,13 +74,21 @@ A [builder][builder] configuration schema is as follows: > will not change despite new lifecycle versions being released. - #### `build.env` _(optional)_ - The [[build.env]] is used to override platform environment variables at build-time. use Env `CNB_BUILD_CONFIG_DIR` to override when building image from cli to change default(`/cnb/build-config`) directory of these build-time environment variables stored + The [[[build.env]]](https://github.com/buildpacks/spec/blob/main/buildpack.md#environment-variable-modification-rules) is used to specify [operator-defined](https://github.com/buildpacks/spec/blob/main/platform.md#operator-defined-variables) build-time environment variables for buildpacks. Set `CNB_BUILD_CONFIG_DIR` in pack's environment to override the default directory (`/cnb/build-config/env`) where environment variable files are stored within the builder. - **`name`** _(string, required)_\ - The Name/Key of the Environment Variable. If Platform Environment Variable key/name is specified, then it is overridden at build-time else it will create a build-time environment variable with the given `name` that is not defined(key/name doesn't exists) at runtime of the container + The name/key of the environment variable. If a platform environment variable with the given key/name exists, it will be overridden at build time. Otherwise, a new build-time environment variable with the given name will be created. - **`value`** _(string, required)_\ - The value of the given name/key of the Environment Variable overriden to + The value of the specified environment variable, depends on the `suffix`. + + - **`suffix`** _(string, optional)_\ + The type of action performed on platform environment variables, one of [`default`](https://github.com/buildpacks/spec/blob/main/buildpack.md#default), [`override`](https://github.com/buildpacks/spec/blob/main/buildpack.md#override), [`append`](https://github.com/buildpacks/spec/blob/main/buildpack.md#append), or [`prepend`](https://github.com/buildpacks/spec/blob/main/buildpack.md#prepend). Defaults to `default` if this field is omited. + + - **`delim`** _(string, optional)_\ + The delimiter used to concatenate two or more values for the given `name`. + + > The `delim` is required when `suffix` is one of `append` or `prepend`. ### Supported archives From 16c3a425c9bc9b5a46add87de2f39c5d219b3975 Mon Sep 17 00:00:00 2001 From: WYGIN Date: Thu, 26 Oct 2023 19:32:27 +0530 Subject: [PATCH 3/3] improve readability Signed-off-by: WYGIN --- content/docs/reference/config/builder-config.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/reference/config/builder-config.md b/content/docs/reference/config/builder-config.md index 18bd86e69..a298e2144 100644 --- a/content/docs/reference/config/builder-config.md +++ b/content/docs/reference/config/builder-config.md @@ -77,13 +77,13 @@ A [builder][builder] configuration schema is as follows: The [[[build.env]]](https://github.com/buildpacks/spec/blob/main/buildpack.md#environment-variable-modification-rules) is used to specify [operator-defined](https://github.com/buildpacks/spec/blob/main/platform.md#operator-defined-variables) build-time environment variables for buildpacks. Set `CNB_BUILD_CONFIG_DIR` in pack's environment to override the default directory (`/cnb/build-config/env`) where environment variable files are stored within the builder. - **`name`** _(string, required)_\ - The name/key of the environment variable. If a platform environment variable with the given key/name exists, it will be overridden at build time. Otherwise, a new build-time environment variable with the given name will be created. + The name/key of the environment variable. - **`value`** _(string, required)_\ - The value of the specified environment variable, depends on the `suffix`. + The value of the environment variable. - **`suffix`** _(string, optional)_\ - The type of action performed on platform environment variables, one of [`default`](https://github.com/buildpacks/spec/blob/main/buildpack.md#default), [`override`](https://github.com/buildpacks/spec/blob/main/buildpack.md#override), [`append`](https://github.com/buildpacks/spec/blob/main/buildpack.md#append), or [`prepend`](https://github.com/buildpacks/spec/blob/main/buildpack.md#prepend). Defaults to `default` if this field is omited. + The type of action used to modify the environment variable when end-users or buildpacks define the same name/key, one of [`default`](https://github.com/buildpacks/spec/blob/main/buildpack.md#default), [`override`](https://github.com/buildpacks/spec/blob/main/buildpack.md#override), [`append`](https://github.com/buildpacks/spec/blob/main/buildpack.md#append), or [`prepend`](https://github.com/buildpacks/spec/blob/main/buildpack.md#prepend). Defaults to `default` if this field is omitted. Operator-defined environment variables take precedence over end-user or buildpack-defined environment variables. - **`delim`** _(string, optional)_\ The delimiter used to concatenate two or more values for the given `name`.