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