Files
openstapps/.gitlab-ci.yml
Michel Jonathan Schmitz da59fcbfa8 ci: update ci jobs
2021-04-27 15:30:09 +02:00

81 lines
1.5 KiB
YAML

image: registry.gitlab.com/openstapps/projectmanagement/node
stages:
- build
- test
- publish
before_script:
- npm install
build:
stage: build
script:
- npm run build
artifacts:
paths:
- lib
unit:
stage: test
script:
- npm test
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
stage: test
dependencies:
- build
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
script:
- 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 .
except:
- /(^v[0-9]+\.[0-9]+\.[0-9]+$|^master$|^develop$)/
image-build:
before_script: []
image: registry.gitlab.com/openstapps/projectmanagement/builder
stage: publish
dependencies:
- build
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
script:
- 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 push $CI_REGISTRY_IMAGE/$REGISTRY_BRANCH$CI_COMMIT_REF_NAME:latest
only:
- /(^v[0-9]+\.[0-9]+\.[0-9]+$|^master$|^develop$)/
pages:
artifacts:
paths:
- public
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
script:
- npm run documentation
- mv docs public
stage: publish