har*_*ish 6 gitlab-ci gitlab-ci-runner
在新的 WIN10 机器上安装带有 shell 执行器(即 powershell)的 gitlab-runner 并启动 CI 构建会引发以下错误:
Preparing environment
ERROR: Job failed (system failure): prepare environment: failed to start process: exec: "pwsh": executable file not found in %PATH%. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
Run Code Online (Sandbox Code Playgroud)
har*_*ish 15
发现gitlab-runner config.toml中pwsh的shell属性条目在某些WIN10机器上不起作用。所以我不得不编辑 confg.toml 如下:
从
[[runners]]
name = "ci-runner"
url = "http://xxx.yyy.xx/"
token = "XXXXX"
executor = "shell"
shell = "pwsh"
Run Code Online (Sandbox Code Playgroud)
到
[[runners]]
name = "ci-runner"
url = "http://xxx.yyy.xx/"
token = "XXXXX"
executor = "shell"
shell = "powershell"
Run Code Online (Sandbox Code Playgroud)
然后重新启动 gitlab-runner 解决了这个问题。
gitlab-runner.exe restart
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1915 次 |
| 最近记录: |