Open
Description
I have just setup the docker runner, but I have been unable to run a simple npm powered build.
When I run my simple gitlab-ci.yml setup
before_script:
- whoami
- git config --global core.autocrlf input
- git config core.filemode false
# - npm install grunt-cli
# - npm install
runtest:
script:
- npm test
I expect it to run the npm test
command
However, the debug info from Gitlab is like this
cd /gitlab-ci-runner/tmp/builds/project-2 && git reset --hard && git clean -fdx && git remote set-url origin http://gitlab-ci-token:[email protected]/internal/boilerplate.git && git fetch origin
HEAD is now at f5090d9 Add debug info
From http://gitlab.myserver.com/internal/boilerplate
f5090d9..77abc6a master -> origin/master
cd /gitlab-ci-runner/tmp/builds/project-2 && git reset --hard && git checkout 77abc6a1fba5b83ce3dcd4d1570ae9fe2077c707
HEAD is now at f5090d9 Add debug info
Previous HEAD position was f5090d9... Add debug info
HEAD is now at 77abc6a... Debug
whoami
root
git config --global core.autocrlf input
git config core.filemode false
npm test
/tmp/executor20170524-7-8ugb7h: line 15: npm: command not found
It seems that I cannot find the npm binary.
The weird part is, that if I go into the docker image, by issuing docker exec -it gitlab-ci-runner-nodejs bash
. npm runs just fine. Even in the tmp folder where the runner checks out the files to.
I tried to insert a whoami
step in my before_scripts, and the runner is run as root.
Why cant the runner execute the npm command when running through Gitlab, but it works fine from the bash of the docker container?
Metadata
Metadata
Assignees
Labels
No labels