Build successful but pipeline doesn't finish

Hello,

I’m getting started with Gitlab CI. I did a lot of research already and after hitting a few bumps I’m able to get my project up and running. My project is an express app. I’d like to add CI to test if my project is building, afterward I’d like to add CD which isn’t the priority at the moment.

The problem is, the project is building and installing correct, afterwards it runs but It doesn’t know when the run is successful or not.

What should I do to let my gitlab runner know that my build was successful?


Gitlab is at version 10.0.2, runner version (in docker):

Version:      10.0.1
Git revision: e991d1b4
Git branch:   10-0-stable
GO version:   go1.8.3
Built:        Wed, 27 Sep 2017 21:47:08 +0000
OS/Arch:      linux/amd64

.gitlab-ci.yml file contents

# https://hub.docker.com/r/library/node/tags/
image: node:alpine

# ssl verify false because of:
# https://gitlab.com/gitlab-org/gitlab-runner/issues/2703
# https://gitlab.com/gitlab-org/gitlab-runner/issues/2795
variables: 
  GIT_SSL_NO_VERIFY: "1"
  NODE_ENV: "development"
  MONGO_URI: "mongodb://mongo/admin"

# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service
services:
- mongo:3.2

# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
  paths:
  - node_modules/
 
before_script:
  - apk add --no-cache bash git openssh

stages: 
  - build
  - deploy

build_app:
  stage: build
  only: 
    - master
  script:
   - npm install
   - node ./app.js
   
# deploy
#   stage: deploy
#   only: master
#   script: deploy stuff

output: (other emitted)

npm info ok 
$ node ./app.js
node environment: development
connected
app listening on port: 3002
updates executed

this means my app is listening and running. It should show successful after this.


Any help appreciated. Sorry If I made rooky mistakes, I’m just getting into CI with gitlab!