Gitlab-runner shell permissions

Trying out gitlab and trying to build a simple create-react-app project. However, I’m having issues with the gitlab-runner. I’m running gitlab on an EC2 instance using the AMI from gitlab that’s in the amazon marketplace.

my yml is really basic.

  image: node:9
  stage: build
    - pwd
    - node -v
    - npm install
    - npm run build
    expire_in: 1 week
      - build

Running in the web UI the output is

Running with gitlab-runner 10.1.0 (c1ecf97f)
  on runner-1 (9fc6bc1c)
Using Shell executor...
Running on ip-10-214-239-156...
Fetching changes...
HEAD is now at eeb69dc try again
From https://${gitlab_domain}/${user}/${project}
   eeb69dc..36498f6  testtest   -> origin/testtest
Checking out 36498f64 as testtest...
Skipping Git submodules setup
$ pwd
$ node -v
ERROR: Job failed: exit status 1

running sudo gitlab-runner --debug exec shell build-site when ssh’d into the ec2 machine has the same result. Any ideas?

I added the pwd and node -v just to test but it also fails the same way on npm install

I assume you want to use docker executor since you specify the image node:9. Executors | GitLab

Shell executor executes your script on the runner installed machine, not docker container.

For more support, it’s better to ask in Issues · / gitlab-runner · GitLab