Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.62 KB

File metadata and controls

40 lines (26 loc) · 1.62 KB

Meta

  • Name: Auto-load User-provided Environment Variables
  • Start Date: 2019-06-17
  • Status: Implemented
  • CNB Pull Requests: rfcs#14, spec#55, lifecycle#163
  • CNB Issues: (lifecycle issues to follow)

Motivation

This proposal makes it easier to write a simple buildpack that respects user-provided environment variables.

What it is

This RFC proposes that user-provided environment variable be loaded by default. This should make it easier to write a simple buildpack that passes along arbitrary build-time environment variables.

How it Works

User-provided build-time environment variables are loaded in the detection and build environment automatically unless clear-env = true is specified in the buildpack's entry in buildpack.toml. In both cases, the environment variables continue to be available in <platform>/env/.

If any lifecycle-provided env var is specified by the user, and clear-env = true is not set, then the user-provided value is prepended immediately before each /bin/build invocation, so that the value precedes any layer-provided values.

Questions

N/A

Drawbacks

The <platform> directory argument feels unnecessary in the default case.

Alternatives

Keep current environment variable behavior.