-
Notifications
You must be signed in to change notification settings - Fork 58
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
Pass env to run_sh #2050
Labels
Comments
hey @barnabasbusa ! It's not an actual solution, but a workaround would be inlining the environment variable:
|
my point would be to be able to inject a variable from outside. somevalue = (1+2) |
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 5, 2024
## Description: This change adds `env_vars` to the run_sh. Feature was requested in issue #2050. Example of used in practice: ``` def run(plan, args={}): result = plan.run_sh( run = "mkdir -p kurtosis && echo $EXAMPLE", image = "badouralix/curl-jq", env_vars = { "EXAMPLE": "this_is_a_test" }, ) ``` outputs: ``` Container images used in this run: > badouralix/curl-jq - locally cached > run_sh run="mkdir -p kurtosis && echo $EXAMPLE" image="badouralix/curl-jq" env_vars={"EXAMPLE": "this_is_a_test"} Command returned with exit code '0' and the following output: -------------------- this_is_a_test -------------------- Starlark code successfully run. No output was returned. ``` ## Is this change user facing? YES ## References (if applicable): Closes: #2050
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 5, 2024
🤖 I have created a release *beep* *boop* --- ## [0.86.13](0.86.12...0.86.13) (2024-02-05) ### Features * add `env_vars` as input to `run_sh` ([#2114](#2114)) ([5a30ea7](5a30ea7)), closes [#2050](#2050) * add nodejs devtools to Nix ([#2099](#2099)) ([7bbb2bc](7bbb2bc)) * add run docker compose with kurtosis guide ([#2085](#2085)) ([7bbe479](7bbe479)) * Add RunStarlarkScript to enclave manager API ([#2103](#2103)) ([1eeb3eb](1eeb3eb)) ### Bug Fixes * adding the `core script build call`, which was removed by accident, in the main build script ([#2118](#2118)) ([1f73821](1f73821)) * Fix calls to stacktrace in the reverse proxy module ([#2100](#2100)) ([a7fefc2](a7fefc2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: kurtosisbot <[email protected]> Co-authored-by: Anders Schwartz <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background & motivation
It would be great if I could pass env variables to run_sh.
Desired behaviour
How important is this to you?
Painful; the lack of this feature makes using Kurtosis frictionful.
What area of the product does this pertain to?
CLI: the Command Line Interface
The text was updated successfully, but these errors were encountered: