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

adds platform environment variables related content from the spec #771

Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
+++
title="Specify the build time environment variables"
weight=4
+++

`Environment variables` are used to configure buildpack behavior. They may be specified by:

Check warning on line 6 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('are used'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('are used').", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 6, "column": 25}}}, "severity": "INFO"}

Check warning on line 6 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('be specified'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('be specified').", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 6, "column": 76}}}, "severity": "INFO"}

* The platform operator (this page)

Check warning on line 8 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Parens] Use parentheses judiciously. Raw Output: {"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 8, "column": 25}}}, "severity": "INFO"}
* The end user (see [Customize buildpack behavior with build-time environment variables][end user])
* Other buildpacks (see [Specify the environment][env])

Check warning on line 10 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Parens] Use parentheses judiciously. Raw Output: {"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 10, "column": 1}}}, "severity": "INFO"}

<!--more-->

When more than one entity specifies the same `environment variable`, the order of precedence is as shown above, with the platform operator having ultimate say over what the final value of the variable will be.

Check warning on line 14 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'preceding' instead of 'above'. Raw Output: {"message": "[Google.WordList] Use 'preceding' instead of 'above'.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 14, "column": 106}}}, "severity": "WARNING"}

Check warning on line 14 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 14, "column": 202}}}, "severity": "WARNING"}

The platform operator specifies `environment variables` in a manner that is very similar to buildpacks (see XXX), but with a few differences. Namely:

Check warning on line 16 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Contractions] Use 'that's' instead of 'that is'. Raw Output: {"message": "[Google.Contractions] Use 'that's' instead of 'that is'.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 16, "column": 69}}}, "severity": "INFO"}

Check warning on line 16 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Parens] Use parentheses judiciously. Raw Output: {"message": "[Google.Parens] Use parentheses judiciously.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 16, "column": 104}}}, "severity": "INFO"}

Check warning on line 16 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Acronyms] Spell out 'XXX', if it's unfamiliar to the audience. Raw Output: {"message": "[Google.Acronyms] Spell out 'XXX', if it's unfamiliar to the audience.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 16, "column": 109}}}, "severity": "INFO"}

* The directory for environment variable settings `/cnb/build-config`
* When no suffix is provided, the modification behavior is `default`

Check warning on line 19 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('is provided'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('is provided').", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 19, "column": 18}}}, "severity": "INFO"}
For more information, consult the [Platform Specification](https://github.com/buildpacks/spec/blob/main/platform.md).

### Example

Platform operators can make choices that "override" or provide defaults for application authors. In the following configuration the platform operator overrides the value of `CGO_ENABLED` for all application authors. The value of `PIP_VERBOSE` is set by default and can be overridden by buildpack authors or application authors. Any value for the environment variable `CLASSPATH` is prepended with the values provided by the platform operator.

Check failure on line 24 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Spacing] 's. I' should have one space. Raw Output: {"message": "[Google.Spacing] 's. I' should have one space.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 24, "column": 95}}}, "severity": "ERROR"}

Check failure on line 24 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Spacing] 's. T' should have one space. Raw Output: {"message": "[Google.Spacing] 's. T' should have one space.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 24, "column": 215}}}, "severity": "ERROR"}

Check failure on line 24 in content/docs/for-platform-operators/how-to/build-inputs/build-env.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Spacing] 's. A' should have one space. Raw Output: {"message": "[Google.Spacing] 's. A' should have one space.", "location": {"path": "content/docs/for-platform-operators/how-to/build-inputs/build-env.md", "range": {"start": {"line": 24, "column": 328}}}, "severity": "ERROR"}

```bash
$ tree /cnb/buildconfig/env
├── CGO_ENABLED.override
├── PIP_VERBOSE
└── CLASSPATH.prepend
```

[env]: https://buildpacks.io/docs/for-buildpack-authors/how-to/write-buildpacks/specify-env/
[end user]: https://buildpacks.io/docs/for-app-developers/how-to/build-inputs/configure-build-time-environment/
Loading