-
Notifications
You must be signed in to change notification settings - Fork 279
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
Set individual environment variables for build #99
Conversation
A little background context. riff currently uses a |
pack allows setting build-time environment variables via a file, but not as individual values on the cli. This PR adds the ability to set one (or more) environment variables directly as cli switches. The same semantics are preserved from --env-file where a value can be forwarded from the current environment if a variable name is specified without a value. The new flags can be used to augment or override specific values from a file. The BuildFlags struct now includes an Env field in addition to EnvFile. The BuildConfig struct EnvFile field has been renamed to Env for consistency as the field contains the parsed values and not a file. Refs buildpacks/roadmap#25 Signed-off-by: Scott Andrews <sandrews@pivotal.io>
Merged master and fixed a conflict with build config changes. cc @ekcasey |
@scothis I was under the impression that Is |
@ekcasey yes, riff embeds pack rather than shelling out. On its own, this PR is not enough to fully solve riff's needs, but it provides a large step towards scratching that itch. I'll open another PR that takes a baby step towards creating a programatic API that exposes the same capabilities. This PR is updated to resolve conflicts. |
@scothis Thanks for the explanation. If we think cli users will value having a I think the only thing missing here is acceptance test coverage. If we are exposing a new flag we should add coverage in |
Signed-off-by: Scott Andrews <sandrews@pivotal.io>
Signed-off-by: Scott Andrews <sandrews@pivotal.io>
@ekcasey added an acceptance test and manually verified that all the tests are actually passing |
pack allows setting build-time environment variables via a file, but not
as individual values on the cli. This PR adds the ability to set one (or
more) environment variables directly as cli switches.
The same semantics are preserved from --env-file where a value can be
forwarded from the current environment if a variable name is specified
without a value. The new flags can be used to augment or override
specific values from a file.
The BuildFlags struct now includes an Env field in addition to EnvFile.
The BuildConfig struct EnvFile field has been renamed to Env for
consistency as the field contains the parsed values and not a file.
Refs buildpacks/roadmap#25