GitLab CI 指南
前置工作
-
部署GitLab
-
部署GitLab-Runner
-
注册Runner到GitLab
docker exec -it gitlab-runner bash # 进入容器 gitlab-runner register #调用register命令开始注册 # 在Gitlab Setting中找到Runners,如下图所示Enter the GitLab instance URL (for example, https://gitlab.com/):复制Register Url Enter the registration token:复制register tokenEnter a description for the runner:输入描述信息Enter tags for the runner (comma-separated):输入一个标记,简短即可,供后续使用Enter an executor: virtualbox, docker+machine, docker-ssh+machine, kubernetes, custom, docker, docker-ssh, ssh, parallels, shell:选择执行方式,选择docker即可(在docker中进行后续操作)Enter the default Docker image (for example, ruby:2.6):设置默认的docker镜像注册完成 Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
在项目工程根目录下