Hi - i’ve been trying to get Gitlab CI to run the build and test of my node.js app but have come across a strange problem. Wherever I place an array of scripts, only the first runs and then says “Build succeeded”. I tested with some basic commands and it appears to be npm, bower commands (possibly anything using node)
Here is my .gitlab-ci.yml file:
cache:
paths:
- /node_modules/
- /bower_components/
before_script:
- npm install --silent
- bower install
stages:
- test
- build
runtest:
stage: test
script: "grunt karma:ci"
runbuild:
stage: build
script:
- grunt build
- cd dist
- npm install --silent
- grunt compress
artifacts:
paths:
- build.zip
In this case, npm install --silent
will run and complete for each job then say “Build Succeeded”.
See below for the output from the runner for the first job - i’ve truncated it for easier reading.
Running with gitlab-ci-multi-runner 1.7.1 (f896af7)
Using Shell executor...
Fetching changes...
warning: Could not stat path ...
HEAD is now at 8a0286d replace with previously working gitlab file
From [repo]
8a0286d..16033cc master -> origin/master
Checking out 16033cc7 as master...
Checking cache for runtest/master...
Successfully extracted cache
$ npm install --silent
[truncated npm install output, it's successful]
Creating cache runtest/master...
Created cache
Build succeeded
I’m hoping it’s just me being stupid, but I can’t figure out what’s going on here.