我完全遵循官方document来设置我的Windows运行程序,并且我可以成功注册并安装运行程序,在注册执行程序时使用 shell ,然后启动运行程序并检查状态,显示运行正常。但是,当我触发带有Windows运行程序标记的作业时,该作业将始终挂起,并且当我再次检查运行程序状态时,它将变为未运行。
我在Window 7和Window 10上都尝试过,并且遇到相同的问题。
我也试图跑步
gitlab-runner --debug run
但是日志仅显示跑步者可以接受这份工作,但无声地崩溃了。
C:\GitLab-Runner>gitlab-runner.exe --debug run
Runtime platform arch=amd64 os=windows pid=15912 revision=d0b76032 version=12.0.2
Starting multi-runner from C:\GitLab-Runner\config.toml ... builds=0
Checking runtime mode GOOS=windows uid=-1
Configuration loaded builds=0
listenaddress: ""
sessionserver:
listenaddress: ""
advertiseaddress: ""
sessiontimeout: 1800
concurrent: 1
checkinterval: 0
loglevel: null
logformat: null
user: ""
runners:
- name: window 10
limit: 0
outputlimit: 0
requestconcurrency: 0
runnercredentials:
url: https://gitlab.com/
token: 6e46f139636cfea3ce2301be1b4225
tlscafile: ""
tlscertfile: ""
tlskeyfile: ""
runnersettings:
executor: shell
buildsdir: ""
cachedir: ""
cloneurl: ""
environment: []
preclonescript: ""
prebuildscript: ""
postbuildscript: ""
debugtracedisabled: false
shell: powershell
custombuilddir:
enabled: false
ssh: null
docker: null
parallels: null
virtualbox: null
cache:
type: ""
path: ""
shared: false
s3:
serveraddress: ""
accesskey: ""
secretkey: ""
bucketname: ""
bucketlocation: ""
insecure: false
gcs:
cachegcscredentials:
accessid: ""
privatekey: ""
credentialsfile: ""
bucketname: ""
machine: null
kubernetes: null
sentrydsn: null
modtime: 2019-07-16T14:59:02.7487831+02:00
loaded: true
builds=0
listen_address not defined, metrics & debug endpoints disabled builds=0
[session_server].listen_address not defined, session endpoints disabled builds=0
Starting worker builds=0 worker=0
Feeding runners to channel builds=0
Dialing: tcp gitlab.com:443 ...
Checking for jobs... nothing runner=6ee6f139
Feeding runners to channel builds=0
Checking for jobs... nothing runner=6ee6f139
Feeding runners to channel builds=0
Checking for jobs... received job=33225 repo_url=https://gitlab.com/my-project/repo.git runner=6ee6f139
Failed to requeue the runner: builds=1 runner=6ee6f139
Running with gitlab-runner 12.0.2 (d0b76032) job=33225 project=278 runner=6ee6f139
on window 10 6ee6f139 job=33225 project=278 runner=6ee6f139
Shell configuration: environment: []
dockercommand:
- PowerShell
- -NoProfile
- -NoLogo
- -InputFormat
- text
- -OutputFormat
- text
- -NonInteractive
- -ExecutionPolicy
- Bypass
- -Command
- '-'
command: powershell
arguments:
- -noprofile
- -noninteractive
- -executionpolicy
- Bypass
- -command
passfile: true
extension: ps1
job=33225 project=278 runner=6ee6f139
Using Shell executor... job=33225 project=278 runner=6ee6f139
Waiting for signals... job=33225 project=278 runner=6ee6f139
Executing build stage build_stage=prepare_script job=33225 project=278 runner=6ee6f139
Executing build stage build_stage=get_sources job=33225 project=278 runner=6ee6f139
答案 0 :(得分:0)
我设法弄清楚原因。 我的GitLab版本是11.4.0-ee,Windows gitlab运行程序版本是12.0.2,可以从日志中看到。将运行程序降级到11.11.4版后,它可以立即运行而没有任何问题。在作业日志中,我可以看到一条消息:
DEPRECATION: this GitLab server doesn't support refspecs, gitlab-runner 12.0 will no longer work with this version of GitLab
我认为升级Gitlab服务器也应该解决该问题。这是版本不匹配的问题。