we need a prepare state because some jobs havent an node env.

use node14 anyways
This commit is contained in:
lukas 2020-12-22 18:55:45 +01:00
parent 60b14b3c0d
commit e11f021efe

View File

@ -1,19 +1,17 @@
image: node:latest image: node:14
stages: stages:
- prepare
- build - build
- test - test
- packaging - packaging
- deploy - deploy
# Cache modules in between jobs
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
- .npm/ - .npm/
- node_modules/
before_script:
- npm ci --cache .npm --prefer-offline
include: include:
- template: Code-Quality.gitlab-ci.yml - template: Code-Quality.gitlab-ci.yml
@ -21,6 +19,11 @@ include:
variables: variables:
SAST_DISABLE_DIND: "true" SAST_DISABLE_DIND: "true"
Node_dependencies:
stage: prepare
script:
- npm ci --cache .npm --prefer-offline
Minimize: Minimize:
stage: build stage: build
script: script:
@ -29,6 +32,7 @@ Minimize:
expire_in: 7 days expire_in: 7 days
paths: paths:
- build/ - build/
needs: ["Node_dependencies"]
Frontend_Tests: Frontend_Tests:
stage: test stage: test
@ -38,6 +42,7 @@ Frontend_Tests:
reports: reports:
junit: junit:
- ./junit.xml - ./junit.xml
needs: ["Node_dependencies"]
code_quality: code_quality:
tags: tags: