refactor: app deployment

This commit is contained in:
2023-06-05 10:54:18 +02:00
parent b21833de40
commit 3b8a344d73
104 changed files with 583 additions and 13494 deletions

View File

@@ -1,98 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
.DS_Store
# Schema generation data
Diagram-*.svg
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
#DynamoDB Local files
.dynamodb/
########## end of https://github.com/github/gitignore/blob/master/Node.gitignore
# ignore ide files
.idea
.vscode
# ignore lib directory
lib/
# ignore docs directory
docs/
# ignore openapi resources
openapi/

View File

@@ -1,87 +0,0 @@
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

View File

@@ -1,32 +0,0 @@
## Summary
(Summarize the bug encountered concisely)
## Steps to reproduce
(How one can reproduce the issue - this is very important)
## Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
## What is the current bug behavior?
(What actually happens)
## What is the expected correct behavior?
(What you should see instead)
## Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
## Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label ~meeting

View File

@@ -1,13 +0,0 @@
## Description
(Describe the feature that you're requesting concisely)
## Explanation
(Explain why the feature is necessary)
## Dependencies, issues to be resolved beforehand
(List issues or dependencies that need to be resolved before this feature can be implemented)
/label ~meeting

View File

@@ -1,12 +0,0 @@
# Ignore all files/folders by default
# See https://stackoverflow.com/a/29932318
/*
# Except these files/folders
!lib
lib/tsconfig.tsbuildinfo
!LICENSE
!package.json
!package-lock.json
!README.md
!resources
!src

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/core-tools",
"description": "Tools to convert and validate StAppsCore",
"version": "2.1.0",
"version": "3.0.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/core-tools.git",
@@ -25,8 +25,14 @@
"bin": {
"openstapps-core-tools": "app.js"
},
"files": [
"app.js",
"lib",
"README.md",
"Dockerfile"
],
"scripts": {
"build": "tsup --dts",
"build": "tsup-node --dts",
"docs": "typedoc --json ./docs/docs.json --options ../../typedoc.base.json src/index.ts",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
@@ -48,7 +54,7 @@
"del": "6.1.1",
"flatted": "3.2.7",
"fs-extra": "10.1.0",
"glob": "10.2.6",
"glob": "10.2.7",
"got": "12.6.0",
"humanize-string": "3.0.0",
"json-schema": "0.4.0",
@@ -61,7 +67,6 @@
},
"devDependencies": {
"@openstapps/eslint-config": "workspace:*",
"@openstapps/nyc-config": "workspace:*",
"@openstapps/prettier-config": "workspace:*",
"@openstapps/tsconfig": "workspace:*",
"@types/chai": "4.3.5",
@@ -77,7 +82,7 @@
"nock": "13.3.1",
"ts-node": "10.9.1",
"tsup": "6.7.0",
"typedoc": "0.24.7",
"typedoc": "0.24.8",
"typescript": "4.9.5"
},
"tsup": {