Files
openstapps/.gitlab-ci.yml
Karl-Philipp Wulfert 385617fe39 ci: allow test job to fail
2019-04-04 14:24:32 +02:00

76 lines
1.3 KiB
YAML

image: registry.gitlab.com/openstapps/projectmanagement/node
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules
stages:
- build
- test
- deploy
build:
stage: build
script:
- npm install
- npm run build
artifacts:
paths:
- lib
expire_in: 1 week
audit:
stage: test
script:
- npm audit
allow_failure: true
except:
- schedules
scheduled-audit:
stage: test
script:
- npm audit
only:
- schedules
mocha:
stage: test
script:
- npm install
- npm test
pages:
stage: deploy
script:
- npm install
- npm run documentation
- mv docs public
only:
- master
artifacts:
paths:
- public
docker:
image: registry.gitlab.com/openstapps/projectmanagement/builder:latest
dependencies:
- build
stage: deploy
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- docker build -t registry.gitlab.com/openstapps/api/copy:$CI_BUILD_REF_NAME .
- docker push registry.gitlab.com/openstapps/api/copy:$CI_BUILD_REF_NAME
- docker build -t registry.gitlab.com/openstapps/api/copy:latest .
- docker push registry.gitlab.com/openstapps/api/copy:latest
tags:
- docker
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/