setup-testkube GHA failing
tvthatsme opened this issue · 4 comments
tvthatsme commented
I am trying to run the kubeshop/setup-testkube@v1
GitHub action to run a test, but getting an error about a missing path. I am using a self-hosted runner.
Run kubeshop/setup-testkube@v1
with:
namespace: testkube
channel: stable
url: testkube.io
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ***
AWS_SECRET_ACCESS_KEY: ***
Detected mode: kubectl connection. To use Cloud connection instead, provide your 'organization', 'environment' and 'token'.
Architecture: x86_6[4](https://github.com/.../actions/runs/8193959727/job/22408893779#step:5:4) (x8[6](https://github.com/.../actions/runs/8193959727/job/22408893779#step:5:6)_64)
System: Linux (Linux)
Binary path: <none>
/runner/_work/_actions/kubeshop/setup-testkube/v1/dist/index.js:10[7](https://github.com.../actions/runs/8193959727/job/22408893779#step:5:7)47
throw new Error("Could not find a writable path that is exposed in PATH to put the binary.");
^
Error: Could not find a writable path that is exposed in PATH to put the binary.
at /runner/_work/_actions/kubeshop/setup-testkube/v1/dist/index.js:[10](https://github.com.../actions/runs/8193959727/job/22408893779#step:5:10)747:[11](https://github.com/.../actions/runs/8193959727/job/22408893779#step:5:12)
Any ideas on how to fix this?
vsukhin commented
thank you @tvthatsme guess @rangoo94 can comment it
rangoo94 commented
@devcatalin, did you encounter such problems while testing the tool cache on self-hosted machine?
tvthatsme commented
I figured out the problem. We are using self-hosted runners, so not the standard ubuntu-latest
but a container that builds on top of that.
I needed to add this
- name: Set up temporary directory for Testkube setup
# gets around PATH not being writable in self-hosted runners
run: |
mkdir -p $HOME/tmp
chmod +w $HOME/tmp
echo "$HOME/tmp" >> $GITHUB_PATH
before I called the step
- uses: kubeshop/setup-testkube@v1
This fixes the issue but wasn't immediately clear when running into the error.
vsukhin commented
thank you, @tvthatsme for both raising it and especially for sharing the fix! Hope it will help other users!