Closed sgaist closed 4 months ago
hmm, a wild guess
https://github.com/firecow/gitlab-ci-local?tab=readme-ov-file#tracked-files
will ^ fix the issue
What @ANGkeith said 👍
Feel free to reopen, if git add
isn't your issue.
Sadly it's something different.
The original issue was detected with an already existing repository where all required files were added.
To ensure I did not miss something for the reproducer, I did a commit with all the files before starting gitlab-ci-local
.
@firecow AFAIK, I cannot reopen the issue myself since I did not close it and I am not a collaborator on the project.
Cool managed to replicate it
The "Expected behaviour" run uses python:3.12-slim-bookworm for the image.
my bad i missed this message of yours
seemed like this bug is caused by the entrypoint
of the image changing the cwd
As a tempfix:
---
job:
image: quay.io/condaforge/linux-anvil-cos7-x86_64
script:
- cd $CI_PROJECT_DIR # <============
- echo "Heya"
- ls -la
- python3 hello.py
How does Gitlab manage to handle this CI_PROJECT_DIR swith-a-roo?
without digging into the source code,
i suspect its doing the same thing under the hood
Thanks !
Minimal .gitlab-ci.yml illustrating the issue
hello.py
:Expected behavior
Actual behavior
Host information KDE Neon gitlab-ci-local 4.46.1
macOS 13.6.6 gitlab-ci-local 4.49.00
Containerd binary macOS Docker Desktop with Docker version 24.0.7-rd, build 72ffacf
Linux Docker version 26.1.2, build 211e74b
Additional context The "faulty" image can be used successfully with GitLab with the docker runner. The "Expected behaviour" run uses
python:3.12-slim-bookworm
for the image.Both images can be run using docker directly.