尝试使用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

答案 0 :(得分:1)
必须将用户gitlab-runner
添加到泊坞窗组
usermod -aG docker gitlab-runner
似乎已经完成了这个伎俩