-
Notifications
You must be signed in to change notification settings - Fork 664
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
Include env
variables defined in a dependency
in the step itself.
#4047
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prior to this commit, a `dependency` defined by the `molecule.yaml` file would not honor the values in its `env` map. Consider the following: ```yaml dependency: name: shell command: env env: FOO: bar ``` Invoking `molecule test` would show that `FOO` is not set during the run of this dependency. The cause was the fact that these values were never actually passed to the `util.run_command()` invocation. This also means `MOLECULE_EPHEMERAL_DIRECTORY` and similar `MOLECULE_*` environment variables that are defined by the dependency's `default_env` property were also never available to the dependency's environment.
for more information, see https://pre-commit.ci
zhan9san
force-pushed
the
dependency-environments
branch
from
November 14, 2023 09:15
bc7a768
to
88071dd
Compare
for more information, see https://pre-commit.ci
ssbarnea
approved these changes
Dec 13, 2023
7 tasks
ssbarnea
requested changes
Jan 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure that CI/CD reports passing on all jobs.
Closing due to lack of updates. If someone else wants to takeover this, I an reopen it. |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this commit, a
dependency
defined by themolecule.yaml
file would not honor the values in itsenv
map. Consider the following:Invoking
molecule test
would show thatFOO
is not set during the run of this dependency. The cause was the fact that these values were never actually passed to theutil.run_command()
invocation. This also meansMOLECULE_EPHEMERAL_DIRECTORY
and similarMOLECULE_*
environment variables that are defined by the dependency'sdefault_env
property were also never available to the dependency's environment.This may also fix some other issues, such as #3848 and maybe #3839.