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

exec function passing arguments to shell script #2173

Open
raje312 opened this issue Apr 26, 2023 · 1 comment
Open

exec function passing arguments to shell script #2173

raje312 opened this issue Apr 26, 2023 · 1 comment

Comments

@raje312
Copy link

raje312 commented Apr 26, 2023

I am trying to pass value from Environment values.yaml to shell script to get the version of server using curl command. The value is passed on to the script since I can echo first argument in script but curl does not recognize ${endpoint} and returns null. I can also echo $endpoint (returns "serverInfo") . Is there something I am missing

helmfile.yaml:

{{ $version := exec "./get-version.sh" (list "{{ .Environment.Values.env.urlendpoint }}" ) }}
;
;
environments:
default:
values:
- /environments/values.yaml

values.yaml ( environment)
env:
urlendpoint: "serverInfo"

get-version.sh

endpoint=$1
curl -s -L https://testserver.com/${endpoint} # returns version of the server

@yxxhero
Copy link
Contributor

yxxhero commented Aug 30, 2023

@raje312 please an new issue into helmfile/helmfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants