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

Dunner envs not working #89

Open
apoorvam opened this issue Jun 25, 2019 · 3 comments
Open

Dunner envs not working #89

apoorvam opened this issue Jun 25, 2019 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@apoorvam
Copy link
Collaborator

With latest master, try :

commands:
      - ["echo","$FOO_USER"]
      - ["echo", "$BUILD_DIR"]
envs:
      - FOO_USER=foo
      - BUILD_DIR=`$GOPATH`

Environment variables are not passed to container. The commands above do not print passed values.

@apoorvam apoorvam added the bug Something isn't working label Jun 25, 2019
@ayushjn20
Copy link
Collaborator

Use printenv command to check if environment variables are set or not. I did.
Actually, the problem is the command here is being executed as echo "$FOO_USER", which will have output $FOO_USER and not foo. But if you use $FOO_USER inside a bash script and copy it inside the container, it might work correctly.

@apoorvam
Copy link
Collaborator Author

Okay, I tried with printenv. So its being set correctly.

But this is also a usecase that should work with echo. Do you think we can address it with some change?

@ayushjn20
Copy link
Collaborator

ayushjn20 commented Aug 6, 2019

Try this!

- [sh, -c, "echo $FOO_USER"]

Reference

@agentmilindu agentmilindu added the help wanted Extra attention is needed label Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants