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

feat(config): add support for varFiles #1156

Merged
merged 1 commit into from
Sep 9, 2019
Merged

feat(config): add support for varFiles #1156

merged 1 commit into from
Sep 9, 2019

Conversation

edvald
Copy link
Collaborator

@edvald edvald commented Sep 4, 2019

What this PR does / why we need it:

This allows users to include a garden.env file for project-global
variables, and garden.<env-name>.env files for environment-specific
variables. You may also override the file paths for each of those.

These variables are made available in ${var.<key>} template keys,
same as variables specified directly in the project garden.yml.

Which issue(s) this PR fixes:

Closes #1093

Special notes for your reviewer:

A full documentation guide for variables and templating will follow in a
separate PR.

@edvald edvald force-pushed the varfiles branch 2 times, most recently from aa4b1ae to bc4e23d Compare September 5, 2019 22:06
Copy link
Collaborator

@thsig thsig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just had one question there.


| Type | Required | Default |
| -------- | -------- | ------------------------ |
| `string` | No | `"garden.undefined.env"` |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this undefined be here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm no. Not sure what causes that... I'll fix it.

This allows users to include a `garden.env` file for project-global
variables, and `garden.<env-name>.env` files for environment-specific
variables. You may also override the file paths for each of those.

These variables are made available in `${var.<key>}` template keys,
same as variables specified directly in the project garden.yml.

A full documentation guide for variables and templating will follow in a
separate PR.
@edvald edvald merged commit e2ade31 into master Sep 9, 2019
@edvald edvald deleted the varfiles branch September 9, 2019 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Garden to read variables from files
2 participants