Hiya

When you run Bash from tools like GoCD it runs non-interactive, non-login
shells so my understanding is that no files such as .bashrc are
automatically loaded.

If you want to tell a task to load this automatically you could set
BASH_ENV=/home/go/.bashrc (or to any other such init file) in the GoCD
environment variables for any pipeline/stage/job. If you really want it to
apply across all commands on the agent you could set BASH_ENV in the GoCD
agent environment too and it would propagate to all tasks that agent runs.

-Chad

On Sat, Dec 4, 2021 at 11:44 AM Sifu Tian <[email protected]> wrote:

> Hi Everyone,
>
> Ive been spinning my wheels trying to get my pipeline to run a straight
> forward salt-ssh command place in the script editor.
>
> I've updated my .bashrc with the path export PATH=$PATH:/var/go/.local/bin
> as this is where salt-ssh is installed however I still get an error
> */f835531d-e481-4e73-8770-bfb4950256fa.sh: line 2: salt-ssh: command not
> found*
> *[script-executor] Script completed with exit code: 127.*
>
> When I run the command from the agent under the go user, it runs just fine:
> -------------- Succeeded: 102 (changed=8) Failed: 0 -------------- Total
> states run: 102 Total run time: 9.241 s
>
> Im not sure what Im doing wrong but any help would be greatly appreciated
>
> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/go-cd/9dabb32c-d43f-4acf-b892-116486832dbbn%40googlegroups.com
> <https://groups.google.com/d/msgid/go-cd/9dabb32c-d43f-4acf-b892-116486832dbbn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/CAA1RwH_RSS-CfZ3A2eFw2hvXwzCM6uSSywT5gkXZzE5LOWOE1g%40mail.gmail.com.

Reply via email to