fix: fix ci job dependencies and caching

This commit is contained in:
Anselm Rochus Stordeur
2019-02-21 16:13:01 +01:00
committed by Rainer Killinger
parent 9637574071
commit f59cc5832c

View File

@@ -1,9 +1,8 @@
image: registry.gitlab.com/openstapps/projectmanagement/node:latest image: registry.gitlab.com/openstapps/projectmanagement/node
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
- lib
- node_modules - node_modules
stages: stages:
@@ -11,25 +10,21 @@ stages:
- test - test
- publish - publish
before_script:
- npm install
build: build:
before_script:
- npm install
stage: build stage: build
script: script:
- npm run build - npm run build
artifacts: artifacts:
untracked: true
paths: paths:
- node_modules/ - lib
only:
- /(^v[0-9]+\.[0-9]+\.[0-9]+$|^master$|^develop$)/
tags: tags:
- docker - docker
test: test:
stage: test stage: test
dependencies:
- build
script: script:
- npm test - npm test
tags: tags:
@@ -39,7 +34,6 @@ publish:
image: registry.gitlab.com/openstapps/projectmanagement/builder image: registry.gitlab.com/openstapps/projectmanagement/builder
stage: publish stage: publish
dependencies: dependencies:
- test
- build - build
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2