我想在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
有沒有辦法正確配置呢?
謝謝你的長篇大論地解釋,我想用猛砸風格的路徑,但已經沒有更新的問題/加我自己的答案。不過,它也會對其他人有幫助! –