-
Notifications
You must be signed in to change notification settings - Fork 173
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
Variable substitution not working in env files #656
Comments
Hi, you need to enable it with the config flags |
Hi, thanks for your suggestion, but the situation is the same with Actually, according to the documentation, this CLI option is for value files not env files: I need the substitution in an env file that is passed to helmsman with the |
Our use case is that the operations team provides a helm repo base URL in an env var on the CI server and we would like to use it in our
|
Oh, I think the problem might be that we're not expanding the environment variables inside the env file. I'll look into that. |
Hi, I've opened a PR to address this (#657) would you be able to test your use case using a build from that branch? |
I was checking There are issues regarding this: |
as a workaround, untill this gets fixed upstream, you can try adding something like this in your CI: export SOMETHING=some_value
printenv > cur.env
helmsman --debug -e cur.env -e .env -f helmsman.yaml |
Keeping this open as |
Sorry, I was offline for a few days. I'll check if it solves our problem. |
just built helmsman from the master branch, but it doesn't seem to be working :( |
Yeah, I think the problem is that with the current implementation There's also https://github.com/subosito/gotenv I can have a look at that and see it would be a suitable replacement if the issue doesn't get fixed in |
Yes, I just checked the |
Once subosito/gotenv#15 is merged, I think we can switch from |
Hi @luisdavim I just checked it and it looks good! 👍 The variable is resolved either if its in another env file or just simply exported before calling helmsman. Thank you for your efforts! |
It seems that environment variables are not substituted in env files.
I use helmsman 3.9.0. I checked the
godotenv
library that this project uses for loading env files and from version 1.3.0 it should work. Helmsman 3.9.0 uses 1.4.0 of this lib.Example:
helmsman.yaml
.env file
Calling helmsman:
result (from helmsman output)
Am I doing somethong wrong or is it a bug?
The text was updated successfully, but these errors were encountered: