摘要
这是在Windows中摸索Gitlab Runner的第一个坑:默认的值是“pwsh”。
1、网上有人说,删除这一行
或者改为
shell = ""
这样就会造成流水线无法获取到.gitlab-ci.yml中定义的变量。
正确做法
shell = "powershell"
本文在说什么?
说的是toml文件,完整展示如下:
concurrent = 1
check_interval = 0
connection_max_age = "15m0s"
shutdown_timeout = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "Alice-WIndows-11"
url = "https://gitlab.********.cn"
id = 37
token = "********-******************"
token_obtained_at = 2024-04-11T16:39:42Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "shell"
shell = "powershell"
[runners.cache]
MaxUploadedArchiveSize = 0
未完待续……
标签:shell,Windows,Gitlab,Runner,token,powershell From: https://www.cnblogs.com/amisoft/p/18133538/gitlab-runner-windows-shell-value