feat: docker publishing

This commit is contained in:
2023-06-27 12:06:08 +02:00
parent c4260dc882
commit 129f25d1f0
18 changed files with 210 additions and 378 deletions

View File

@@ -1,6 +1,7 @@
integration:backend:
integration:
image: registry.gitlab.com/openstapps/projectmanagement/builder:v18
stage: test
needs: ['build']
variables:
DOCKER_DRIVER: overlay2
WAIT_FOR_SERVICES_TIMEOUT: 1
@@ -8,10 +9,8 @@ integration:backend:
- name: registry.gitlab.com/openstapps/database:latest
alias: elasticsearch
script:
- pnpm --filter=@openstapps/backend --filter=@openstapps/api-cli install --prefer-offline
- pnpm test:integration
tags:
- performance
- pnpm --filter=@openstapps/backend install --prefer-offline
- pnpm test:integration:backend
artifacts:
when: always
paths:
@@ -19,3 +18,5 @@ integration:backend:
reports:
junit:
- backend/backend/coverage/integration-report-junit.xml
rules:
- when: on_success

View File

@@ -1,32 +0,0 @@
version: '3'
services:
backend:
build:
dockerfile: ./Dockerfile
context: ../../.deploy/backend
ports:
- '3000:3000'
environment:
STAPPS_LOG_LEVEL: '31'
STAPPS_EXIT_LEVEL: '8'
NODE_CONFIG_ENV: 'elasticsearch'
NODE_ENV: 'integration-test'
ALLOW_NO_TRANSPORT: 'true'
ES_ADDR: 'http://elasticsearch:9200'
command: wait-for http://elasticsearch:9200 -t 120 -- node app.js
elasticsearch:
build: ../database
ports:
- '9200:9200'
api-cli:
build:
dockerfile: ../../packages/api-cli/Dockerfile
context: ../../.deploy/api-cli
environment:
STAPPS_LOG_LEVEL: '31'
STAPPS_EXIT_LEVEL: '8'
volumes:
- ./node_modules/@openstapps/core/test/resources:/@openstapps/core/test/resources:ro
command: e2e http://backend:3000 --waiton tcp:backend:3000 --samples /@openstapps/core/test/resources/indexable

View File

@@ -27,6 +27,7 @@
],
"scripts": {
"build": "tsup-node",
"build:docker": "docker build -t openstapps:backend ../../.deploy/backend",
"deploy": "pnpm --prod --filter=@openstapps/backend deploy ../../.deploy/backend",
"dev": "tsup --watch --onSuccess \"pnpm run start\"",
"format": "prettier . -c --ignore-path ../../.gitignore",

View File

@@ -30,6 +30,8 @@
],
"scripts": {
"build": "tsup-node --dts",
"build:docker": "docker build -t openstapps:proxy ../../.deploy/proxy",
"deploy": "pnpm --prod --filter=@openstapps/proxy deploy ../../.deploy/proxy",
"format": "prettier . -c --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
"lint": "eslint --ext .ts src/",