ci: publish image after build and tests

This commit is contained in:
Anselm Stordeur
2019-01-21 14:53:24 +01:00
parent 8978bd4a14
commit 5e3518bd62

View File

@@ -11,15 +11,28 @@ stages:
- test - test
- deploy - deploy
build: build:build:
stage: build stage: build
script: script:
- npm install - npm install
- npm run build - npm run build
build:image: test:audit:
stage: test
script:
- npm audit
test:mocha:
stage: test
script:
- npm test
publish:image:
image: docker:stable image: docker:stable
stage: build dependencies:
- build
- test
stage: publish
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
services: services:
@@ -35,17 +48,7 @@ build:image:
only: only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/ - /^v[0-9]+\.[0-9]+\.[0-9]+$/
audit: deploy:pages:
stage: test
script:
- npm audit
mocha:
stage: test
script:
- npm test
pages:
stage: deploy stage: deploy
script: script:
- npm run documentation - npm run documentation