mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 09:32:41 +00:00
feat: add api
This commit is contained in:
57
.gitlab-ci.yml
Normal file
57
.gitlab-ci.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
image: node:lts-alpine
|
||||
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- lib
|
||||
- node_modules
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- npm install
|
||||
- npm run build
|
||||
|
||||
build:image:
|
||||
image: docker:stable
|
||||
stage: build
|
||||
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]+$/
|
||||
|
||||
audit:
|
||||
stage: test
|
||||
script:
|
||||
- npm audit
|
||||
|
||||
mocha:
|
||||
stage: test
|
||||
script:
|
||||
- npm test
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
script:
|
||||
- npm run documentation
|
||||
- mv docs public
|
||||
only:
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
Reference in New Issue
Block a user