ci: update ci jobs

This commit is contained in:
Michel Jonathan Schmitz
2020-11-03 12:56:51 +01:00
committed by Rainer Killinger
parent ae7a879e64
commit da59fcbfa8

View File

@@ -1,35 +1,43 @@
image: registry.gitlab.com/openstapps/projectmanagement/node image: registry.gitlab.com/openstapps/projectmanagement/node
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules
stages: stages:
- build - build
- test - test
- publish - publish
before_script:
- npm install
build: build:
stage: build stage: build
script: script:
- npm install
- npm run build - npm run build
artifacts: artifacts:
paths: paths:
- lib - lib
tags:
- docker
test: unit:
stage: test stage: test
script: script:
- npm install
- npm test - npm test
tags:
- docker
test:image-build: audit:
allow_failure: true
except:
- schedules
script:
- npm audit
stage: test
scheduled-audit:
only:
- schedules
script:
- npm audit
stage: test
image-test:
before_script: []
image: registry.gitlab.com/openstapps/projectmanagement/builder image: registry.gitlab.com/openstapps/projectmanagement/builder
stage: test stage: test
dependencies: dependencies:
@@ -41,10 +49,11 @@ test:image-build:
script: script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE/$REGISTRY_BRANCH$CI_COMMIT_REF_NAME:latest . - docker build -t $CI_REGISTRY_IMAGE/$REGISTRY_BRANCH$CI_COMMIT_REF_NAME:latest .
tags: except:
- docker - /(^v[0-9]+\.[0-9]+\.[0-9]+$|^master$|^develop$)/
publish: image-build:
before_script: []
image: registry.gitlab.com/openstapps/projectmanagement/builder image: registry.gitlab.com/openstapps/projectmanagement/builder
stage: publish stage: publish
dependencies: dependencies:
@@ -59,5 +68,14 @@ publish:
- docker push $CI_REGISTRY_IMAGE/$REGISTRY_BRANCH$CI_COMMIT_REF_NAME:latest - docker push $CI_REGISTRY_IMAGE/$REGISTRY_BRANCH$CI_COMMIT_REF_NAME:latest
only: only:
- /(^v[0-9]+\.[0-9]+\.[0-9]+$|^master$|^develop$)/ - /(^v[0-9]+\.[0-9]+\.[0-9]+$|^master$|^develop$)/
tags:
- docker pages:
artifacts:
paths:
- public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
script:
- npm run documentation
- mv docs public
stage: publish