【发布时间】:2021-12-10 21:07:24
【问题描述】:
我正在我的 Mac 上本地设置 gitlab-runner,以便能够使用 docker 运行构建和测试脚本。我已通过 Gitlab runners 页面上列出的安装说明在本地安装 runner:
# Download the binary for your system
sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64
# Give it permissions to execute
sudo chmod +x /usr/local/bin/gitlab-runner
# The rest of commands execute as the user who will run the Runner
# Register the Runner (steps below), then run
cd ~
gitlab-runner install
gitlab-runner start
据我所知,它安装得很好。然后我像这样注册了一个跑步者:
sudo gitlab-runner register --url https://gitlab.com/ --registration-token $REGISTRATION_TOKEN
(我显然用我的令牌替换了$REGISTRATION_TOKEN)。当它提示我提供更多详细信息时,我输入了以下内容:
- 标签:(我把这个留空)
- 输入执行者:
docker - 输入默认docker镜像:
node:14.0.0
然后我收到以下消息:
Runner注册成功。随意启动它,但如果它是 已经运行的配置应该会自动重新加载!
当我导航到项目的根目录时,我尝试运行 gitlab-runner run 但我收到以下错误:
Starting multi-runner from /Users/ben/.gitlab-runner/config.toml... builds=0
WARNING: Running in user-mode.
WARNING: Use sudo for system-mode:
WARNING: $ sudo gitlab-runner...
Configuration loaded builds=0
listen_address not defined, metrics & debug endpoints disabled builds=0
[session_server].listen_address not defined, session endpoints disabled builds=0
^CWARNING: [runWait] received stop signal builds=0 stop-signal=interrupt
WARNING: Graceful shutdown not finished properly builds=0 error=received stop signal: interrupt
WARNING: Starting forceful shutdown StopSignal=interrupt builds=0
All workers stopped. Can exit now builds=0
当我查看 config.toml 时,如果上面的错误可能暗示它可能缺少某些配置?这是整个文件的猫:
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
我不确定为什么会收到此错误消息?我的配置看起来还好吗?在搜索问题时,我发现另一个线程说只是将“可以运行未标记的作业”设置为是,我已经完成了,但它仍然不起作用......
【问题讨论】:
标签: javascript node.js gitlab devops