mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-05 13:02:54 +00:00
91 lines
1.6 KiB
YAML
91 lines
1.6 KiB
YAML
image: registry.gitlab.com/openstapps/projectmanagement/node
|
|
|
|
cache:
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
paths:
|
|
- node_modules
|
|
|
|
before_script:
|
|
- npm install
|
|
|
|
stages:
|
|
- build
|
|
- test
|
|
- deploy
|
|
|
|
build:
|
|
stage: build
|
|
script:
|
|
- npm run build
|
|
artifacts:
|
|
paths:
|
|
- lib
|
|
|
|
package:
|
|
dependencies:
|
|
- build
|
|
tags:
|
|
- secrecy
|
|
stage: deploy
|
|
script:
|
|
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
|
|
- npm publish
|
|
only:
|
|
- /^v[0-9]+.[0-9]+.[0-9]+$/
|
|
artifacts:
|
|
paths:
|
|
- lib
|
|
|
|
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 test
|
|
|
|
pages:
|
|
stage: deploy
|
|
script:
|
|
- npm run documentation
|
|
- mv docs public
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
|
|
|
docker:
|
|
image: registry.gitlab.com/openstapps/projectmanagement/builder:latest
|
|
before_script: []
|
|
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]+$/
|
|
|