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

all shells: Pass env vars through a key value store #11569

Merged
merged 13 commits into from Feb 16, 2022
Merged

Conversation

azr
Copy link
Contributor

@azr azr commented Feb 15, 2022

This potentially fixes #11197, by allowing to set shell env vars from a key/value map.

Merge hashicorp/packer-plugin-sdk#98 first.

  • shell: add env key/value store possibility
  • docs shell
  • docs shell-local
  • docs PowerShell
  • docs windows shell
  • docs shell-local-post-processor
  • validation test
  • build test
  • build test on windows

@azr azr marked this pull request as ready for review February 15, 2022 13:04
@azr azr requested a review from a team as a code owner February 15, 2022 13:04
]
}
provisioner "shell-local" {
only_on = ["windows"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's a neat feature for tests

Copy link
Member

Choose a reason for hiding this comment

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

Nice little gem.

Copy link
Member

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

This looks good to me. I do wonder if we should deprecate the environment_vars field.

@azr
Copy link
Contributor Author

azr commented Feb 16, 2022

Good question, I would think not here, since for the people using environment_vars: this is not a new feature, but more like a bug fix and I bet a looooot of configs out there use this value.

On another side: these work with datasources, so it's way better 🤔 .

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants