GitLab CI为什么这个runner没有进行构建?

6
当我推送新的提交时,我希望从runner开始构建,但是我收到了以下消息:
此构建已停止,因为您没有任何已分配给它们的标记为dev的在线活动runner。
请转到Runner页面。
我安装了GitLab 8.15.2。
我创建了一个基本的C语言项目,一个“.gitlab-ci.yml”文件:
project1:
  tags:
    - dev
  script:
    - make
    - ./test

如果我删除标签,我会得到几乎相同的消息。

我创建了一个特定的运行器:

root@debian:~# gitlab-ci-multi-runner register
Running in system-mode.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
  http://127.0.0.1
Please enter the gitlab-ci token for this runner:
  XXX
Please enter the gitlab-ci description for this runner:
  [debian]: p1
Please enter the gitlab-ci tags for this runner (comma separated):
  dev
Registering runner... succeeded                     runner=XXX
Please enter the executor: kubernetes, docker, parallels, ssh, docker+machine, docker-ssh, shell, virtualbox, docker-ssh+machine:
  shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
root@debian:~# gitlab-ci-multi-runner verify
Running in system -mode.

Verifying runner... is alive                        runner=XXX

在 /admin/runners 页面中,我可以看到它。
我不明白我错过了什么...

3
你是否已经启动了Runner?可以使用gitlab-ci-multi-runner startgitlab-ci-multi-runner run命令。 - oLen
1
使用 gitlab-ci-multi-runner run 命令使构建工作正常,非常感谢! - julien2313
好的!我会把这个作为答案。 - oLen
我有一个问题,即GitLab Runner的版本必须与GitLab的版本相同,以安装特定版本的GitLab Runner https://docs.gitlab.com/runner/install/linux-repository.html - vuhung3990
1个回答

12

您仍需要启动runner:

执行gitlab-ci-multi-runner start命令来启动服务,或者在终端中直接执行gitlab-ci-multi-runner run命令来运行它。


在两台电脑上都尝试了,但仍然没有任何进展 :) - Dživo Jelić
在我的情况下,“gitlab-ci-multi-runner stop”和“gitlab-ci-multi-runner start”有所帮助。 - Apoc

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接