mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-04 12:32:57 +00:00
refactor: move core-tools to monorepo
This commit is contained in:
88
packages/core-tools/.gitlab-ci.yml
Normal file
88
packages/core-tools/.gitlab-ci.yml
Normal file
@@ -0,0 +1,88 @@
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/node
|
||||
|
||||
|
||||
before_script:
|
||||
- npm ci
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- audit
|
||||
- deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- npm run build
|
||||
artifacts:
|
||||
paths:
|
||||
- lib
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- npm test
|
||||
|
||||
audit:
|
||||
stage: audit
|
||||
script:
|
||||
- npm audit
|
||||
allow_failure: true
|
||||
except:
|
||||
- schedules
|
||||
|
||||
scheduled-audit:
|
||||
stage: audit
|
||||
script:
|
||||
- npm audit --audit-level=high
|
||||
only:
|
||||
- schedules
|
||||
|
||||
openapi:
|
||||
dependencies:
|
||||
- build
|
||||
stage: test
|
||||
script:
|
||||
- npm install @openstapps/core
|
||||
- node lib/cli.js openapi node_modules/@openstapps/core/lib openapi
|
||||
- NUMBER_OF_LINES=$(cat openapi/openapi.json | wc -l)
|
||||
- if [ "$NUMBER_OF_LINES" -lt 100 ]; then exit 1; fi
|
||||
artifacts:
|
||||
paths:
|
||||
- openapi/openapi.json
|
||||
|
||||
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
|
||||
|
||||
uml:
|
||||
dependencies:
|
||||
- build
|
||||
stage: test
|
||||
services:
|
||||
- name: registry.gitlab.com/openstapps/core-tools:latest
|
||||
alias: plantuml
|
||||
script:
|
||||
- node lib/cli.js plantuml test/model http://plantuml:8080 --showProperties --showOptionalProperties --showInheritedProperties --showEnumValues --showAssociations --showInheritance --excludeExternals
|
||||
|
||||
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