I updated from gitlab-runner 1.3.0 to 1.4.0 and now my builds fail with the following message
Running with gitlab-ci-multi-runner 1.4.0 (5dd9b2f)Using Shell executor...Running on BUILD1...bash: line 51: /e/Multi-Runner/E:/Multi-Runner/builds/483a0fb2/0/my-namespace/my-project.tmp/GIT_SSL_CAINFO: No such file or directoryERROR: Build failed: exit status 1
The file E:/Multi-Runner/builds/483a0fb2/0/my-namespace/my-project.tmp/GIT_SSL_CAINFO exists. Since I am using shell executor with bash on windows.
The path to the file should be:
/e/Multi-Runner/builds/483a0fb2/0/my-namespace/my-project.tmp/GIT_SSL_CAINFO and not
@ph03 We are testing that on Linux machines for now. Currently we are working on adding a separate Windows and Mac machines to test this type of regressions.
I got the same problem with shell = "bash" on Windows:
Running with gitlab-ci-multi-runner 1.4.1 (fae8f18)Using Shell executor...Running on MH.../usr/bin/bash: line 43: /d/Programs/GitLab_CI/D:/Programs/GitLab_CI/builds/8d2dc509/0/michael.huepkes/gitLabTest.tmp/GIT_SSL_CAINFO: No such file or directoryERROR: Build failed: exit status 1
Running with gitlab-ci-multi-runner 1.5.2 (76fdacd)Using Shell executor...Running on xxx...bash: Zeile 44: /home/yyy/c:/gitlab-runner/builds/f808858f/0/grp-aaa/bbb.tmp/GIT_SSL_CAINFO: No such file or directoryERROR: Build failed: exit status 1
Ayeayeaye. Good spot. This will be caused by the "Absolute" helper in shells/bash.go
The Bash generator assumes it's running in a UNIXy environment, so its check for "is this an absolute path?" is "does this path start with the / character?" - which is wrong on Windows, of course.
I'll see if I can come up with something, but it's unlikely to be for 1.6 :/
Just a frindly reminder that you can still downgrade to gitlab runner 1.3.x which still runs fine with the current gitlab release (unless you need some 1.4 / 1.5 features of course).
@nick.thomas I would say that this is not a problem of using Absolute() and that it uses path rather then filepath.
The problem is that the b.TemporaryPath is set to E:/Multi-Runner/... when in Windows' bash it should be in the /e/Multi-Runner/... syntax. If the path would be set as it is used on Windows, then it would look as a standard unix path with the / on the beginning (and the Absolute function would work as it's working on Unix).
I think we should:
Determine how Windows is preparing the path's for its bash. Is it always X: => /x/ or maybe there are any other rules?
@j-steinblock Yes, those are descriptions for WSL introducecd in latest Windows version.
Bash can be used on Windows in several ways:
WSL
cygwin
bash bundled with git for Windows (MSGit? don't remember the name now; I know there are two commonly used git packages for windows and one of them includes a bash shell)
Few years ago I've used something else so there are probably other options to use bash on Windows.
Is path converted the same way in all cases? I'd like to avoid doing a path discovering like if pathExist("/c/...") {} elseif pathExists("/mnt/c/...") {} elseif pathExist("/other/option/") {} for each known possibility if there is some standardized way of converting paths when using bash on windows. Maybe you known any documents that are describing it?
Upgraded and got bit by this. I wanted some newer gitlab-runner features, so I had to switch to the cmd executor and move a lot of the functionality in my .gitlab-ci.yaml into a separate .sh file so I could execute that from the yaml file via "bash -c".
Just so others know, that is usually a valid workaround for this.
But man it would have been nice not to have to do that :)
This error is still present in v1.6.0 - is there an eta for a potential fix? We are using the same bash scripts for builds on windows + linux, and having to rewrite the scripts for windows is not a viable option, as they used to work before.
Running with gitlab-ci-multi-runner 1.8.0~beta.3.g51eb636 (51eb636)Using Shell executor...Running on GIMLI...bash: line 54: /d/gitlab-ci-runner/D:/gitlab-ci-runner/builds/88a9dbf3/0/gitlab/duopo/mapa-franquias.tmp/GIT_SSL_CAINFO: No such file or directoryERROR: Build failed: exit status 1
I followed your instructions some time ago and finally manged to update from runner 1.3 to 1.10.
However, today I figured out that caching was broken since the update. Not a huge impact (10-20 secs per job) for me, but it should be