-
Notifications
You must be signed in to change notification settings - Fork 411
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
GitLab CI - Error: BATS_TMPDIR (/tmp) is not writable #564
Comments
From the documentation:
This means it is readonly (from outside Bats) and can only be populated from However, since you set |
Will check tomorrow. Thanks for your really fast answer. |
I tried to reproduce this locally with bats-core checked out at v1.6.0 and using the following adapted
However, the tests ran as expected:
|
Thanks for your very fast support. I am using
I've tried with your suggestion ( I've also tried to install v1.5.0 (instead of v1.6.0) and still the same error (which I didn't understand since the folder has been well created, owned by root (same user) and having 777 as chmod) I'll revert to v1.6.0 in the meantime and disable that stage in my CI. |
Yes, my intention was to show what I had done to reproduce this. As I reused the bats-core repository, I needed to adapt the file paths. I don't think that the location of bats matters in this case.
Okay, so we probably don't have a regression here. Did this work before or did you just set up a new Bats test suite? Can you recreate a public reproducer repository of this? My gut feeling is, that there is something about your CI system/environment that trips up the test. You can also try to run |
Just for the curious: did you find out what was causing this? |
The old bats version might lack the failing check. |
I've built the image from source as well, by specifying bash version in Dockerfile. Versions which I tested: It's not a bats issue that -w condition does not work correctly, in some versions. I wanted just to let You know that using a different bash could fix the issue. |
Okay, thanks for the feedback and the detailed Investigation. |
To follow up further on this, I think this is caused by Alpine 3.14 updating glibc to use the The main issue appears to arise due to seccomp incorrectly returning This causes the access check to incorrectly fail with It should be noted that the From the Alpine notes there are three options to solve this, use runc >= v1.0.0-rc93, use docker >= 20.10, or as a workaround change the default action of the seccomp profile to Testing the
|
Hello
I can't start bats in a GitLab CI, each time I got
Error: BATS_TMPDIR (/tmp) is not writable
. I've tried to change the target folder but nothing works.My
.gitlab-ci.yml
file:Environment:
As you can see below, the
BATS_TMPDIR
folder is set to my current working folder and I've create the folder (mkdir -p
) and change his permissions to777
. The image show that the folder is created with the correct permission but, neverthless, I continue to get the "is not writable" message.Did you see where I'm wrong?
(I've also tried to use the Docker image
https://hub.docker.com/r/bats/bats
but I was unable too to make it working i.e. which command should I run becausebats
seems unknown)The text was updated successfully, but these errors were encountered: