编辑:在修改配置文件并继续尝试和尝试后,我终于决定清除GitLab跑步者并重新安装它。重新安装并进行注册后,一切正常。
每当代码被推送到我的GitLab存储库时,我都尝试创建自动部署。部署只会清理存储库文件,然后复制到/var/www
。我通过这些注册在服务器上设置了一个跑步者:
root@ubuntu-512mb-xxxx:~# gitlab-runner register
Running in system-mode.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci):
https://gitlab.com/ci
Please enter the gitlab-ci token for this runner:
8xxxxxxxxxxxxxxxxxx
Please enter the gitlab-ci description for this runner:
[ubuntu-512mb-xxxx]:
Please enter the gitlab-ci tags for this runner (comma separated):
Registering runner... succeeded runner=8WKnQjRb
Please enter the executor: virtualbox, ssh, shell, parallels, docker, docker-ssh:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically re
loaded!
所以我假设构建将直接在我的主机服务器上运行。
以下是 toml 文件:
concurrent = 1
[[runners]]
name = "ubuntu-512mb-xxxx"
url = "https://gitlab.com/ci"
token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
tls-ca-file = ""
executor = "shell"
[runners.ssh]
[runners.docker]
image = ""
privileged = false
[runners.parallels]
base_name = ""
[runners.virtualbox]
base_name = ""
但是,gitlab生成的构建日志表明它仍然使用docker来运行构建。
gitlab-ci-multi-runner 1.0.0 (xxxxxxx)
Using Docker executor with image ruby:2.1 ...
Pulling docker image mysql:latest ...
Starting service mysql:latest ...
Pulling docker image postgres:latest ...
Starting service postgres:latest ...
Pulling docker image redis:latest ...
Starting service redis:latest ...
Waiting for services to be up and running...
Pulling docker image ruby:2.1 ...
Running on runner-xxxxxxx-project-xxxxxxx-concurrent-0 via xxxxxxxxxxxxxxx...
Cloning repository...
Cloning into '/builds/group/project'...
Checking out xxxxxxx as master...
Note: checking out 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
请不要在我现在正在了解GitLab CI Runner时建议使用webhooks。
感谢。