gitlabrunner之executor配置拉取镜像的账户密码
docker executor
$ cat config.toml
......
[[runners]]
environment = ["DOCKER_AUTH_CONFIG={\"auths\":{\"registry.xxx.com\":{\"auth\":\"dmlwZXIucm9ib3QuZG9ja2VyOlNUYWkyMDIzLm\"}}}"]
......
k8s executor
# 创建一个imagepullsecret
$ kubectl create secret generic inner-gitlab --from-file=.dockerconfigjson=/root/runner/config.json --type=kubernetes.io/dockerconfigjson -n gitlab-runner
# cat config.toml
......
[[runners]]
[runners.kubernetes]
image_pull_secrets = ["inner-gitlab"]
......