提示,如果是直接在docker中运行的gitlab-runner需要在docker配置中将域名添加信任。如果是在k8s中运行的gitlab-runner,需要在ci文件中添加信任配置
在.gitlab-ci.yml文件中使用
构建镜像过程中添加如下代码可推送镜像至仓库
- docker build -t $PROJECT .
- docker login -u 'robot$gitlab' -p 'SeQh123vpuJo3iHz' harbor.thefunc.com
- docker tag chatgptwebapi:latest harbor.thefunc.com/chatgpt/chatgptwebapi:latest
- docker push harbor.thefunc.com/chatgpt/chatgptwebapi:latest
- docker logout harbor.thefunc.com
Hits: 4365