• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
阿愿的笔记本
feedId:68846209220766720+userId:66725942962965504 ]
   首页    新随笔       管理     
gitlab添加CI

 

坑1:

下载速度很慢

解决方案: https://mirrors.tuna.tsinghua.edu.cn/help/gitlab-ci-multi-runner/

配置

提示:GitLab Runner >= 9.0 can be used ONLY with GitLab CE/EE >= 9.0

坑2:

先要安装符合gitlab版本的runner的

查看gitlab版本

http://git.azure.gagogroup.cn/help

GitLab Community Edition 8.13.6 69cda01

sudo yum remove gitlab-ci-multi-runner

sudo yum install gitlab-ci-multi-runner-1.11.1

坑3:

Please enter the executor: shell, docker, docker-ssh, ssh?

shell建议部署使用

docker建议仅仅代码测试使用

坑4:

测试失败显示:gitlab ci webpack EACCES: permission denied

chown webpack:root -R /home/www/

 

坑5:

service使用私有docker容器

https://docs.gitlab.com/ce/ci/docker/using_docker_images.html#define-an-image-from-a-private-docker-registry

 

坑6:

connect:

image: dockerstore.gagogroup.cn:5000/postgis:latest

script:

- export PGPASSWORD="$POSTGRES_PASSWORD"

- psql -h 'dockerstore.gagogroup.cn-postgis' -U "$POSTGRES_USER" -d "$POSTGRES_DB" -a -f './sql/test/test_create.sql'

- psql -h 'dockerstore.gagogroup.cn-postgis' -U "$POSTGRES_USER" -d "$POSTGRES_DB" -a -f './sql/test/test_insert.sql'

 

坑7:

sudo: no tty present and no askpass program specified

要赋予gitlab-runner用户root权限的同时加NOPASSWD

$ sudo usermod -a -G sudo gitlab-runner

sudo visudo

gitlab-runner ALL=(ALL) NOPASSWD: ALL

http://stackoverflow.com/questions/19383887/how-to-use-sudo-in-build-script-for-gitlab-ci

 

坑8:

https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/commands/README.md#gitlab-runner-unregister

gitlab-runner unregister --name test-runner

 

坑9:

centos在yum update之后之前yum install的软件会升到最新版本.

posted on 2017-04-14 21:39  阿愿的笔记本  阅读(1503)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3