我想在Windows上使用bash作为GitLab CI Runner的shell。Windows GitLab使用Bash的CI Runner
concurrent = 1
check_interval = 0
[[runners]]
name = "DESKTOP-RQTQ13S"
url = "https://example.org/ci"
token = "fooooooooooooooooooobaaaaaaaar"
executor = "shell"
shell = "bash"
[runners.cache]
不幸的是我无法找到指定的CI亚军应该用实际的shell程序的选项。默认情况下,它只是试图运行它找不到的bash
。我不知道为什么,因为当我打开一个Windows命令行并输入bash
它的作品。
Running with gitlab-ci-multi-runner 1.9.4 (8ce22bd)
Using Shell executor...
ERROR: Build failed (system failure): Failed to start process: exec: "bash": executable file not found in %PATH%
我尝试添加一个文件bash.cmd
包含
@"C:\Program Files\Git\usr\bin\bash.exe" -l
这给了我这个奇怪的错误我的用户目录:
Running with gitlab-ci-multi-runner 1.9.4 (8ce22bd)
Using Shell executor...
Running on DESKTOP-RQTQ13S...
/usr/bin/bash: line 43: /c/Users/niklas/C:/Users/niklas/builds/aeb38de4/0/niklas/ci-test.tmp/GIT_SSL_CAINFO: No such file or directory
ERROR: Build failed: exit status 1
有没有办法正确配置呢?
谢谢你的长篇大论地解释,我想用猛砸风格的路径,但已经没有更新的问题/加我自己的答案。不过,它也会对其他人有帮助! –