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

SHELL_OPERATOR_HOOKS_DIR not set when running outside of cluster #199

Open
rspurgeon opened this issue Aug 18, 2020 · 2 comments
Open

SHELL_OPERATOR_HOOKS_DIR not set when running outside of cluster #199

rspurgeon opened this issue Aug 18, 2020 · 2 comments
Milestone

Comments

@rspurgeon
Copy link

Following instructions here to debug a hook: https://github.com/flant/shell-operator/blob/master/RUNNING.md

And looking at example using functions like this one: https://github.com/flant/shell-operator/blob/master/examples/003-common-library/hooks/hook.sh

I shouldn't be able to run this example outside of a cluster because of the hardcoded path to the library bash script. I tried adding $SHELL_OPERATOR_HOOKS_DIR into the path but it's empth at runtime when running outside the cluster.

Attempting to source from scripts in this directory returns errcode 127 (command not found?). Verified the empty value by echo'ing the variable in the Hook Run task.

@diafour
Copy link
Contributor

diafour commented Aug 24, 2020

I see, it is not clear in the documentation. There is no passing default hook dir as an environment variable to hooks. You need to set SHELL_OPERATOR_HOOKS_DIR at shell-operator start and then this environment variable should be passed to hooks. Please, report if this is not happening.

@shurup
Copy link
Contributor

shurup commented Jan 15, 2021

I think we can close it as a stalled issue. @diafour have you fixed the relevant documentation?

@diafour diafour added this to the future milestone Mar 31, 2021
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

3 participants