一、gitlab runner类型
shared:运行整个平台项目的作业(gitlab)
group:运行特定group下的所有项目的作业(group)
specific:运行指定的项目作业(project)
二、创建不同类型的runner
2.1shared类型
依次点击主页——>管理中心——>CI/CD——>Runner——>新建实例runner
#按命令提示输入之后 回车 然后 按自己安装runner的模式 shell还是docker
root@k8s-02:~# gitlab-runner register --url http://192.168.30.181 --token glrt-KXvcjZNVMVtCustGF-O3Z286MQp0OjEKdToxCw.01.121vlf8dr
Runtime platform arch=amd64 os=linux pid=23285 revision=cc489270 version=18.2.1
Running in system-mode.
Enter the GitLab instance URL (for example, https://gitlab.com/):
[http://192.168.30.181]:
Verifying runner... is valid correlation_id=01K2CM5N1H5TAGE79WMJ9CMDQN runner=KXvcjZNVM
Enter a name for the runner. This is stored only in the local config.toml file:
[k8s-02]:
Enter an executor: docker-windows, docker-autoscaler, instance, shell, ssh, parallels, docker, docker+machine, kubernetes, custom, virtualbox:
ERROR: Invalid executor specified
Enter an executor: kubernetes, custom, virtualbox, docker-windows, docker-autoscaler, instance, shell, ssh, parallels, docker, docker+machine:
ERROR: Invalid executor specified
Enter an executor: custom, virtualbox, docker-windows, docker-autoscaler, instance, shell, ssh, parallels, docker, docker+machine, kubernetes:
ERROR: Invalid executor specified
Enter an executor: custom, virtualbox, docker-windows, docker-autoscaler, instance, shell, ssh, parallels, docker, docker+machine, kubernetes:
ERROR: Invalid executor specified
Enter an executor: instance, shell, ssh, parallels, docker, docker+machine, kubernetes, custom, virtualbox, docker-windows, docker-autoscaler:
ERROR: Invalid executor specified
Enter an executor: parallels, docker, docker+machine, kubernetes, custom, virtualbox, docker-windows, docker-autoscaler, instance, shell, ssh:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
Configuration (with the authentication token) was saved in "/etc/gitlab-runner/config.toml"
2.2group类型
依次点击主页——>群组——>指定组——>设置——>构建——>runner——>新建群组runner
评论 (0)