final polish

This commit is contained in:
Gergő Jedlicska
2022-03-29 19:54:30 +02:00
parent 893d33a23e
commit dba6d38b6d
3 changed files with 14 additions and 128 deletions
+13 -18
View File
@@ -15,7 +15,7 @@ workflows:
- gergo/CIRewrite
- lint:
filters: *filters-every-push
# - build-viewer:
# # built the npm package
# requires:
@@ -28,9 +28,9 @@ workflows:
# # - main
# - gergo/CIRewrite
# requires:
# # the result of objectloader build can be mounted here from workspace
# - npm_build_object_loader
# requires:
# # the result of objectloader build can be mounted here from workspace
# - npm_build_object_loader
- docker-build-and-publish-server:
context: &docker-hub-context
@@ -40,12 +40,12 @@ workflows:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
branches:
only:
# - main
- gergo/CIRewrite
- main
# - gergo/CIRewrite
requires:
- lint
- test-server
- docker-build-and-publish-frontend:
context: *docker-hub-context
filters: *filters-build
@@ -72,13 +72,12 @@ workflows:
requires:
- lint
- test-server
# - npm_build_viewer
- docker-build-and-publish-test-container:
context: *docker-hub-context
filters: *filters-build
- publish_helm_chart:
- publish-helm-chart:
filters: *filters-build
requires:
- docker-build-and-publish-server
@@ -142,15 +141,15 @@ jobs:
docker: *docker-image
steps:
- checkout
- run:
- run:
command: npm install ../objectloader
working_directory: 'packages/viewer'
- node/install-packages:
app-dir: ~/project/packages/viewer
- run:
- run:
command: npm run build
working_directory: 'packages/viewer'
docker-build-and-publish: &docker-job
docker: *docker-image
steps:
@@ -161,12 +160,11 @@ jobs:
name: Build and Publish
command: ./.circleci/build.sh
docker-build-and-publish-server:
docker-build-and-publish-server:
<<: *docker-job
environment:
SPECKLE_SERVER_PACKAGE: server
docker-build-and-publish-frontend:
<<: *docker-job
environment:
@@ -201,16 +199,13 @@ jobs:
- checkout
- run: node --version
publish_helm_chart:
publish-helm-chart:
docker: *docker-image
# context:
# - helm_repo
steps:
- checkout
- add_ssh_keys:
fingerprints:
- '18:74:c4:b9:dc:66:b2:66:1d:81:56:0d:0a:87:9b:b1'
- run: pwd
- run:
name: Publish Helm Chart
command: ./.circleci/publish_helm_chart.sh
-109
View File
@@ -1,109 +0,0 @@
version: 2.1
# TODO:
# add build workflow for frontend
# rename server test workflow
# add linting jobs
# run jobs/workflows on correct package changes (not all...)
workflows:
test:
jobs:
- test_server
deploy-latest:
jobs:
- build:
context: main-builds
filters:
branches:
only: main
deploy-prod:
jobs:
- build:
context: main-builds
filters:
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/
branches:
ignore: /.*/
ci-test:
jobs:
- build:
context: main-builds
filters:
branches:
only: gergo/noCD
jobs:
test_server:
docker:
- image: 'cimg/node:16.13'
- image: 'circleci/redis:6'
- image: 'cimg/postgres:12.8'
environment:
POSTGRES_DB: speckle2_test
POSTGRES_PASSWORD: speckle
POSTGRES_USER: speckle
environment:
NODE_ENV: test
DATABASE_URL: 'postgres://speckle:speckle@localhost:5432/speckle2_test'
PGDATABASE: speckle2_test
PGUSER: speckle
SESSION_SECRET: 'keyboard cat'
STRATEGY_LOCAL: 'true'
CANONICAL_URL: 'http://localhost:3000'
# Note: some of these commands need to be run in the server package folder.
steps:
- checkout
- run:
command: 'npm install'
working_directory: 'packages/server'
- run: 'dockerize -wait tcp://localhost:5432 -timeout 1m'
- run:
command: 'npm run test:report'
working_directory: 'packages/server'
- run:
command: 'bash <(curl -s https://codecov.io/bash)'
working_directory: 'packages/server'
- store_test_results:
path: packages/server/reports
- store_artifacts:
path: packages/server/coverage
- store_artifacts:
path: packages/server/reports/test-results.xml
build:
docker:
- image: circleci/python:3.7
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Build Frontend
command: env SPECKLE_SERVER_PACKAGE=frontend ./.circleci/build.sh
- run:
name: Build Server
command: env SPECKLE_SERVER_PACKAGE=server ./.circleci/build.sh
- run:
name: Build Object Preview Service
command: env SPECKLE_SERVER_PACKAGE=preview-service ./.circleci/build.sh
- run:
name: Build Webhook Service
command: env SPECKLE_SERVER_PACKAGE=webhook-service ./.circleci/build.sh
- run:
name: Build FileImport Service
command: env SPECKLE_SERVER_PACKAGE=fileimport-service ./.circleci/build.sh
- run:
name: Build Test Container
command: env FOLDER=utils SPECKLE_SERVER_PACKAGE=test-deployment ./.circleci/build.sh
- add_ssh_keys:
fingerprints:
- '18:74:c4:b9:dc:66:b2:66:1d:81:56:0d:0a:87:9b:b1'
- run:
name: Publish Helm Chart
command: ./.circleci/publish_helm_chart.sh
+1 -1
View File
@@ -22,4 +22,4 @@ cd ~/helm
git add .
git commit -m "CircleCI commit"
# git push
git push