mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-05 21:12:52 +00:00
refactor: app deployment
This commit is contained in:
@@ -1,124 +0,0 @@
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/node
|
||||
|
||||
default:
|
||||
tags:
|
||||
- performance
|
||||
|
||||
before_script:
|
||||
- npm ci
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- audit
|
||||
- publish
|
||||
- deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- npm run build
|
||||
artifacts:
|
||||
paths:
|
||||
- lib
|
||||
|
||||
package:
|
||||
dependencies:
|
||||
- build
|
||||
tags:
|
||||
- secrecy
|
||||
stage: publish
|
||||
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: audit
|
||||
script:
|
||||
- npm audit
|
||||
allow_failure: true
|
||||
except:
|
||||
- schedules
|
||||
|
||||
scheduled-audit:
|
||||
stage: audit
|
||||
script:
|
||||
- npm audit --audit-level=high
|
||||
only:
|
||||
- schedules
|
||||
|
||||
unit:
|
||||
stage: test
|
||||
script:
|
||||
- npm test
|
||||
coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/'
|
||||
artifacts:
|
||||
reports:
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: coverage/cobertura-coverage.xml
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
script:
|
||||
- npm run documentation
|
||||
- mv docs public
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
|
||||
docker image:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder:latest
|
||||
dependencies:
|
||||
- build
|
||||
stage: publish
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- export VERSION=$(node -p "require('./package.json').version")
|
||||
- export CORE_VERSION=$(openstapps-projectmanagement get-used-version @openstapps/core)
|
||||
- export IMAGETAG_BASE=$CI_REGISTRY_IMAGE/cli
|
||||
- export IMAGETAG_CORE_VERSION=$IMAGETAG_BASE:core-$CORE_VERSION
|
||||
- export IMAGETAG_VERSION=$IMAGETAG_BASE:$VERSION
|
||||
- export IMAGETAG_LATEST=$IMAGETAG_BASE:latest
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build -t $IMAGETAG_LATEST -t $IMAGETAG_VERSION -t $IMAGETAG_CORE_VERSION .
|
||||
- docker push $IMAGETAG_BASE
|
||||
tags:
|
||||
- secrecy
|
||||
only:
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
|
||||
branch image:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder:latest
|
||||
stage: publish
|
||||
dependencies:
|
||||
- build
|
||||
artifacts:
|
||||
untracked: true
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- export IMAGETAG_BASE=$CI_REGISTRY_IMAGE/cli
|
||||
- export IMAGETAG_BRANCH=$IMAGETAG_BASE:$CI_COMMIT_REF_SLUG
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build -t $IMAGETAG_BRANCH .
|
||||
- docker push $IMAGETAG_BASE
|
||||
except:
|
||||
- /(^v[0-9]+\.[0-9]+\.[0-9]+$|^master$|^develop$)/
|
||||
only:
|
||||
- branches
|
||||
when: manual
|
||||
tags:
|
||||
- secrecy
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/api",
|
||||
"description": "Node.js library to interact with the StApps backend service",
|
||||
"version": "2.1.0",
|
||||
"version": "3.0.0",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/api.git",
|
||||
@@ -17,8 +17,12 @@
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"files": [
|
||||
"lib",
|
||||
"README.md"
|
||||
],
|
||||
"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",
|
||||
@@ -40,7 +44,6 @@
|
||||
"@types/chai-spies": "1.0.3",
|
||||
"@types/mocha": "10.0.1",
|
||||
"@types/traverse": "0.6.32",
|
||||
"undici": "5.22.1",
|
||||
"c8": "7.14.0",
|
||||
"chai": "4.3.7",
|
||||
"chai-as-promised": "7.1.1",
|
||||
@@ -51,8 +54,9 @@
|
||||
"traverse": "0.6.7",
|
||||
"ts-node": "10.9.1",
|
||||
"tsup": "6.7.0",
|
||||
"typedoc": "0.24.7",
|
||||
"typescript": "4.9.5"
|
||||
"typedoc": "0.24.8",
|
||||
"typescript": "4.9.5",
|
||||
"undici": "5.22.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@openstapps/core": "workspace:*"
|
||||
|
||||
Reference in New Issue
Block a user