Install GitLab Runner on Windows

Contents
Install GitLab Runner on Windows
來源: https://docs.gitlab.com/runner/install/windows.html
Windows
- 建立 Runner 的 folder , ex.: C:\GitLab-Runner
- 下載執行檔 64-bit or 32-bit . You can download a binary for every available version as described in Bleeding Edge - download any other tagged release.
- 可以將下載的檔案改名成
gitlab-runner-windows-amd64.exe–>gitlab-runner.exe - 安裝GitLab Runner
Install GitLab Runner as a service and start it. You can either run the service using the Built-in System Account (recommended) or using a user account.
- Run service using Built-in System Account (under directory created in step 1. from above, ex.: C:\GitLab-Runner)
| |
- Run service using user account (under directory created in step 1. from above, ex.: C:\GitLab-Runner) You have to enter a valid password for the current user account, because it’s required to start the service by Windows:
| |
Registering runners
在你的 project -> settings->CI/CD->Runners取得url和token打開終端機, 將機器註冊上去
| |

最後push上去就可以看到拉~

Miscellaneous
fix New runner, has not contacted yet
| |
run local yaml
| |
This job is stuck because the project doesn’t have any runners online assigned to it. Go to project CI settings

是因為 runner 預設 Run untagged jobs 是沒打勾

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

解決方法是
要將 C:\GitLab-Runner 的 config.toml 的 shell = "pwsh" 改成 shell = "powwershell"

在你的 project ->