此作业被卡住,因为没有任何活动的 runner 能运行此构建。 转到 Runners 页面

1. 没有将gitlab-runner注册到gitlab中

输入以下命令

 docker exec -it gitlab-runner gitlab-runner register

[root@localhost ~]# docker ps -a
CONTAINER ID   IMAGE                           COMMAND                  CREATED        STATUS                    PORTS                                                                                                         NAMES
b39d63329796   77a                             "/usr/bin/dumb-init …"   2 hours ago    Up 2 hours                                                                                                                              gitlab-runner
b9f30edcd427   twang2218/gitlab-ce-zh:11.1.4   "/assets/wrapper"        5 hours ago    Up 5 hours (healthy)      0.0.0.0:22->22/tcp, :::22->22/tcp, 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp   gitlab
e555a3db4b44   hello-world                     "/hello"                 27 hours ago   Exited (0) 27 hours ago                                                                                                                 peaceful_banach
[root@localhost ~]# docker exec -it gitlab-runner gitlab-runner register
Runtime platform                                    arch=amd64 os=linux pid=84 revision=5316d4ac version=14.6.0
Running in system-mode.

Enter the GitLab instance URL (for example, https://gitlab.com/):
http://192.168.197.129/
Enter the registration token:
XgjKyiarAdm1S_uQp9MA
Enter a description for the runner:
[b39d63329796]:
Enter tags for the runner (comma-separated):
deploy
Registering runner... succeeded                     runner=XgjKyiar
Enter an executor: docker, shell, ssh, docker+machine, docker-ssh+machine, kubernetes, custom, docker-ssh, parallels, virtualbox:
ss^H
ERROR: Invalid executor specified
Enter an executor: docker, shell, ssh, docker+machine, custom, docker-ssh, parallels, virtualbox, docker-ssh+machine, kubernetes:
[s]: ss
ERROR: Invalid executor specified
Enter an executor: docker, shell, ssh, docker+machine, custom, docker-ssh, parallels, virtualbox, docker-ssh+machine, kubernetes:
[ss]: shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
[root@localhost ~]# ^

 

 成功注册

接下来修改

 工作卡住了,因为你的运行者有标签,但你的工作没有。按照以下 4步骤使您的运行者能够在没有标签的情况下运行:

 并保存修改

回到流水线 

重新运行作业

猜你喜欢

转载自blog.csdn.net/m0_47010003/article/details/128015902