-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can we use bash
for custom workflow's run
step?
#2177
Comments
@lkysow any answer on this ? At least an idea on how to switch to bash would be great |
You folks can use any shell you like by cutting your own image and installing it. RUN apk add bash You can then run a script in a custom workflow and use a shebang like this #!/usr/bin/env bash |
If you'd like to change the interpreter, someone could add a new flag that defaults to sh and passes the flag to each of these places. Please feel free to contribute a new change. The easier method would be to write a shell script, set the interpreter using the shebang, and run it using the |
Sadly I don't think the "easier method" works: with
cat test.sh | sh
Expected output:
|
It appears that the
run
step in a custom workflow is using the Bourne shell (/bin/sh
) rather thanbash
.Is there a way to tell custom workflow's
run
step to usebash
?(I suppose I can do
/bin/bash -c ...
as an indirection, but then I'd have to worry about escaping special characters, etc. It'll be a lot easier if I can just write in straight bash syntax.)UPDATE 6 months later: Some workarounds...
Extend this base Docker image (therefore run our own custom image for Atlantis in Kubernetes). Copy our own
bash
custom shell script (say,/.../my_bash_script.sh
) into the new image, or alternatively, mount a volume (containingmy_bash_script.sh
) to the image/pod. Then, from Atlantisrun
step, we could do/bin/bash /.../my_bash_script.sh
.
The text was updated successfully, but these errors were encountered: