Gitlab-runner权限

时间:2017-11-06 14:42:04

标签: gitlab gitlab-ci-runner gitlab-omnibus

尝试使用gitlab并尝试构建一个简单的create-react-app项目。但是,我遇到了gitlab-runner的问题。我在EC2实例上使用来自gitlab的AMI在亚马逊市场上运行gitlab。

by yml非常基本。



build-site:
  image: node:9
  stage: build
  script:
    - npm install
    - npm run build
  artifacts:
    expire_in: 1 week
    paths:
      - build




然而,我在gitlab web UI中获得的输出是



Running with gitlab-runner 10.1.0 (c1ecf97f)
  on runner-1 (9fc6bc1c)
Using Shell executor...
Running on ip-10-214-239-156...
Fetching changes...
warning: failed to remove builds/0/project-0.tmp/git-template/config
warning: failed to remove builds/0/project-0/.istanbul.yml
warning: failed to remove builds/0/project-0/yarn.lock
warning: failed to remove builds/0/project-0/src/Root.js
warning: failed to remove builds/0/project-0/src/utils/common.js




以及当ssh&#39}进入ec2机器时运行sudo gitlab-runner --debug exec shell build-site时得到的输出



ERROR: Job failed: exit status 1
FATAL: exit status 1 




1 个答案:

答案 0 :(得分:1)

必须将用户gitlab-runner添加到泊坞窗组

usermod -aG docker gitlab-runner

似乎已经完成了这个伎俩