mirror of
https://github.com/standardnotes/server
synced 2026-04-22 00:01:46 -04:00
Compare commits
273 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04e11cbbf7 | |||
| 3aef5998df | |||
| 34018ae7eb | |||
| 2f9d8e776f | |||
| 9503f0d963 | |||
| 32aff3e3f4 | |||
| 9b9f10d4ca | |||
| e4f0cc6b37 | |||
| d211249086 | |||
| 0fc5db8aee | |||
| 0a2abef979 | |||
| 8242f13aff | |||
| 7516ba7028 | |||
| 3417407cbe | |||
| 720d046c00 | |||
| b88f560b07 | |||
| 51b264ca13 | |||
| 0309aeab34 | |||
| aca8d2948d | |||
| 09596d2181 | |||
| e87f7e1674 | |||
| 4ad1cccc33 | |||
| 5d12648669 | |||
| 7e989720bf | |||
| f8a2892811 | |||
| eaab23ec19 | |||
| 36dcdf256f | |||
| 10a596db65 | |||
| c76302cf98 | |||
| 176cf608ef | |||
| f69073ba02 | |||
| 09ecf9262a | |||
| a3fc0d9120 | |||
| 0d5c3283d3 | |||
| 7b486348ef | |||
| 25f752d6b5 | |||
| 74e35a2d65 | |||
| 3532289575 | |||
| 7db9ba03f3 | |||
| b0baaf9ea6 | |||
| b7c6dab3ad | |||
| 2daa145867 | |||
| 4bd5fb22b4 | |||
| 78533a6045 | |||
| e1c533a15e | |||
| b6c2bb8023 | |||
| c45653a50a | |||
| d827513b73 | |||
| ad183ca621 | |||
| 1d11c5a186 | |||
| e84e78ec55 | |||
| f91e4316ff | |||
| d54b812881 | |||
| 28dc5ba2a4 | |||
| 979a320ca6 | |||
| c46186b237 | |||
| 27cf093f85 | |||
| ec0fb7e0b9 | |||
| 90029456fe | |||
| b167b00075 | |||
| b13fab76f3 | |||
| 782a9d310d | |||
| 537b1f2a29 | |||
| 2fad6b62cb | |||
| bf173b4ede | |||
| c52f038c76 | |||
| b12ba98a5c | |||
| dbccdf342b | |||
| 49b6d029c4 | |||
| d6469954ce | |||
| 5f40550ad4 | |||
| 79ccbdf100 | |||
| 1983cfcab2 | |||
| 753f86707f | |||
| 16d0ed505b | |||
| 9de09c55f8 | |||
| c3d7a33aa2 | |||
| a9cc00a478 | |||
| ec035ba648 | |||
| 5446f3cae4 | |||
| 6a550092c2 | |||
| 1b691f6bcd | |||
| 98f45cc4c2 | |||
| edc4a20859 | |||
| 74e1380df8 | |||
| dfa5187ff7 | |||
| c99c4425cd | |||
| 2d8919a079 | |||
| f638287213 | |||
| 991d885b63 | |||
| bb17efa817 | |||
| deec29c1b4 | |||
| 9d872008a7 | |||
| 145b4401af | |||
| 17bd50c263 | |||
| 4cb79de685 | |||
| 28ab0b8e46 | |||
| 6911802b87 | |||
| 5b98924561 | |||
| f13944badc | |||
| af41e6497d | |||
| b1122a3da5 | |||
| b17fddda63 | |||
| 20dc020596 | |||
| b53291650f | |||
| b83d84e519 | |||
| 14794d1a5f | |||
| 6b130ef045 | |||
| 25a6126ef4 | |||
| a2df09fb5b | |||
| 465b2741fb | |||
| 724dc5c86c | |||
| f4208c19a7 | |||
| 6fed293716 | |||
| 29ffaf04c4 | |||
| bc9182f214 | |||
| 91c70a51a0 | |||
| dfe30d7f5e | |||
| 815d5460e7 | |||
| 8a63c6768b | |||
| f7c29848f1 | |||
| 78b9426c1c | |||
| 87b22ac684 | |||
| 46c30d197a | |||
| 36b8354350 | |||
| b6702c7182 | |||
| 09d7f608cd | |||
| d023a27377 | |||
| 190595febf | |||
| b25edec26c | |||
| 85d0c12dad | |||
| 25c98ef078 | |||
| af51baea9a | |||
| e97b16606c | |||
| 5ff9e43899 | |||
| d3a49e109c | |||
| e3dbff6996 | |||
| d9f5410afd | |||
| 0568c8f563 | |||
| 16043a7d68 | |||
| f24ee61d11 | |||
| 881a6967ac | |||
| a93f66c6ac | |||
| fdf4b29ae2 | |||
| d5f6ca0d2e | |||
| 12d9ccf28c | |||
| ffc270cc6f | |||
| 61e2e58297 | |||
| b68ede1f63 | |||
| d333c1393c | |||
| 35d6f2f961 | |||
| 3d619a0c61 | |||
| bda812f170 | |||
| 826719bb67 | |||
| 631101eae5 | |||
| fa0b9bf935 | |||
| 708af5e83c | |||
| 993d31167b | |||
| ac5fc7d28a | |||
| 73f3fad13d | |||
| 85e0e2165f | |||
| 89ee103303 | |||
| 6b313947c3 | |||
| fba8e6ce35 | |||
| 622c024547 | |||
| 2c51d92bab | |||
| 11ef2ef708 | |||
| df793e07fd | |||
| bae6eea3aa | |||
| be17b67cc1 | |||
| 645a24d29b | |||
| 64962ce632 | |||
| 5120883691 | |||
| 0b4570ebee | |||
| 5bbdc7e426 | |||
| a1d60630a0 | |||
| e96fd6d69e | |||
| 1423b3fc35 | |||
| fd10b4d585 | |||
| 8a79437668 | |||
| 85a87dc40a | |||
| 95aa0a0024 | |||
| d0c44d1376 | |||
| b0e31ff305 | |||
| f11569ac53 | |||
| fbf7a61bc9 | |||
| 2265165fa3 | |||
| b216b17ef5 | |||
| b2c7b924ac | |||
| 1349f950c9 | |||
| f1c398a3a4 | |||
| 369231ff11 | |||
| 271dee5be6 | |||
| a0c8f40e7b | |||
| 4db0aef0ff | |||
| 5ed9bd243f | |||
| 2c53306f5a | |||
| a3624357dc | |||
| afe0be31f2 | |||
| 71854b704d | |||
| 0907773d6f | |||
| 787eedc8af | |||
| 040a2b5e5f | |||
| 347ee275fa | |||
| 1c0a9e6726 | |||
| c4f038ab9a | |||
| 3746ac5fc1 | |||
| 5c4353dd0c | |||
| f64caed220 | |||
| 863d590292 | |||
| 0dcf64c82b | |||
| 48fd5c5ff6 | |||
| 84fa374072 | |||
| 2313b0b450 | |||
| 4fa6f579af | |||
| 08c1328932 | |||
| 4586308210 | |||
| 5aa561dcb2 | |||
| e07612fe24 | |||
| c9289204c4 | |||
| 51bb1081a6 | |||
| 25066bb33c | |||
| bfdb176445 | |||
| 42233fa756 | |||
| 55de4319ed | |||
| 306f6edd4e | |||
| bf55bbccd9 | |||
| 6e26c0a0be | |||
| 11bcd318ab | |||
| 2f6d19dc91 | |||
| 989e1ce175 | |||
| 1c2fd46401 | |||
| b7967b34d1 | |||
| 44dfa37852 | |||
| a06e3c7e74 | |||
| b54c331bef | |||
| 8216fe5e36 | |||
| b5c9c4b188 | |||
| 86bd617933 | |||
| eb771e7932 | |||
| 5ea91aeafc | |||
| 3c67290aeb | |||
| f9f6c2f9be | |||
| a92e8f61bc | |||
| e739683bb6 | |||
| f4a743593d | |||
| f93e49ecf3 | |||
| d6325a42ea | |||
| ef997be219 | |||
| b6eadfcebc | |||
| e4c65ca631 | |||
| 2d2342f9ee | |||
| 60838a1b7e | |||
| 63401b7640 | |||
| 6a5b669ec4 | |||
| ca201447d2 | |||
| f1d3117518 | |||
| 8559948a5a | |||
| a3b4aa3b4a | |||
| 0347fa381f | |||
| 3d475cc779 | |||
| ceec74fb70 | |||
| f5296a947e | |||
| 5b5fcd9372 | |||
| c38817c62e | |||
| ba08c6a707 | |||
| 1797bc8181 | |||
| 657aaf75ec | |||
| dac3c733b3 | |||
| d02b6b67b5 | |||
| 52ce5f3a2f | |||
| 1d316e17cb | |||
| 6193f4b87a |
@@ -0,0 +1,13 @@
|
|||||||
|
dist
|
||||||
|
coverage
|
||||||
|
|
||||||
|
.yarn/*
|
||||||
|
!.yarn/cache
|
||||||
|
!.yarn/patches
|
||||||
|
!.yarn/plugins
|
||||||
|
!.yarn/releases
|
||||||
|
!.yarn/unplugged
|
||||||
|
!.yarn/sdks
|
||||||
|
!.yarn/versions
|
||||||
|
|
||||||
|
data/*
|
||||||
+18
@@ -1,6 +1,24 @@
|
|||||||
|
######
|
||||||
|
# DB #
|
||||||
|
######
|
||||||
|
|
||||||
|
DB_HOST=db
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_USERNAME=std_notes_user
|
DB_USERNAME=std_notes_user
|
||||||
DB_PASSWORD=changeme123
|
DB_PASSWORD=changeme123
|
||||||
DB_DATABASE=standard_notes_db
|
DB_DATABASE=standard_notes_db
|
||||||
|
|
||||||
|
#########
|
||||||
|
# CACHE #
|
||||||
|
#########
|
||||||
|
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
REDIS_HOST=cache
|
||||||
|
|
||||||
|
########
|
||||||
|
# KEYS #
|
||||||
|
########
|
||||||
|
|
||||||
|
AUTH_JWT_SECRET=
|
||||||
|
AUTH_SERVER_ENCRYPTION_SERVER_KEY=
|
||||||
|
VALET_TOKEN_SECRET=
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
PUBLIC_FILES_SERVER_URL=http://localhost:3125
|
||||||
|
DB_HOST=db
|
||||||
|
DB_USERNAME=std_notes_user
|
||||||
|
DB_PASSWORD=changeme123
|
||||||
|
DB_DATABASE=standard_notes_db
|
||||||
|
DB_PORT=3306
|
||||||
|
REDIS_PORT=6379
|
||||||
|
REDIS_HOST=cache
|
||||||
|
AUTH_SERVER_ACCESS_TOKEN_AGE=4
|
||||||
|
AUTH_SERVER_REFRESH_TOKEN_AGE=10
|
||||||
|
AUTH_SERVER_EPHEMERAL_SESSION_AGE=300
|
||||||
|
SYNCING_SERVER_REVISIONS_FREQUENCY=5
|
||||||
|
AUTH_SERVER_LOG_LEVEL=debug
|
||||||
|
SYNCING_SERVER_LOG_LEVEL=debug
|
||||||
|
FILES_SERVER_LOG_LEVEL=debug
|
||||||
|
REVISIONS_SERVER_LOG_LEVEL=debug
|
||||||
|
API_GATEWAY_LOG_LEVEL=debug
|
||||||
|
|
||||||
|
MYSQL_DATABASE=standard_notes_db
|
||||||
|
MYSQL_USER=std_notes_user
|
||||||
|
MYSQL_PASSWORD=changeme123
|
||||||
|
MYSQL_ROOT_PASSWORD=changeme123
|
||||||
|
|
||||||
|
AUTH_JWT_SECRET=f95259c5e441f5a4646d76422cfb3df4c4488842901aa50b6c51b8be2e0040e9
|
||||||
|
AUTH_SERVER_ENCRYPTION_SERVER_KEY=1087415dfde3093797f9a7ca93a49e7d7aa1861735eb0d32aae9c303b8c3d060
|
||||||
|
VALET_TOKEN_SECRET=4b886819ebe1e908077c6cae96311b48a8416bd60cc91c03060e15bdf6b30d1f
|
||||||
@@ -55,6 +55,11 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
|
||||||
|
- package-ecosystem: "npm"
|
||||||
|
directory: "/packages/revisions"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/scheduler"
|
directory: "/packages/scheduler"
|
||||||
schedule:
|
schedule:
|
||||||
@@ -86,7 +91,7 @@ updates:
|
|||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/workspace"
|
directory: "/packages/websockets"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call_server_utility_workflow:
|
call_server_application_workflow:
|
||||||
name: Server Utility
|
name: Server Application
|
||||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
|
||||||
with:
|
with:
|
||||||
service_name: analytics
|
service_name: analytics
|
||||||
workspace_name: "@standardnotes/analytics"
|
workspace_name: "@standardnotes/analytics"
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
newrelic:
|
newrelic:
|
||||||
needs: call_server_utility_workflow
|
needs: call_server_application_workflow
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
service_name: api-gateway
|
service_name: api-gateway
|
||||||
workspace_name: "@standardnotes/api-gateway"
|
workspace_name: "@standardnotes/api-gateway"
|
||||||
e2e_tag_parameter_name: api_gateway_image_tag
|
|
||||||
deploy_worker: false
|
deploy_worker: false
|
||||||
package_path: packages/api-gateway
|
package_path: packages/api-gateway
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
service_name: auth
|
service_name: auth
|
||||||
workspace_name: "@standardnotes/auth-server"
|
workspace_name: "@standardnotes/auth-server"
|
||||||
e2e_tag_parameter_name: auth_image_tag
|
|
||||||
package_path: packages/auth
|
package_path: packages/auth
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,6 @@ jobs:
|
|||||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||||
with:
|
with:
|
||||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||||
service: ${{ inputs.service_name }}-prod
|
service: ${{ inputs.service_name }}
|
||||||
cluster: prod
|
cluster: prod
|
||||||
wait-for-service-stability: true
|
wait-for-service-stability: true
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ on:
|
|||||||
service_name:
|
service_name:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
bundle_dir:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
package_path:
|
package_path:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@@ -32,13 +29,17 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Create Bundle Dir
|
||||||
|
id: bundle-dir
|
||||||
|
run: echo "temp_dir=$(mktemp -d -t ${{ inputs.service_name }}-${{ github.sha }}-XXXXXXX)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
id: cache-build
|
id: cache-build
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
packages/**/dist
|
packages/**/dist
|
||||||
${{ inputs.bundle_dir }}
|
${{ steps.bundle-dir.outputs.temp_dir }}
|
||||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
@@ -53,7 +54,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Bundle
|
- name: Bundle
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ inputs.bundle_dir }}
|
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ steps.bundle-dir.outputs.temp_dir }}
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@@ -85,8 +86,8 @@ jobs:
|
|||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
context: ${{ inputs.bundle_dir }}
|
context: ${{ steps.bundle-dir.outputs.temp_dir }}
|
||||||
file: ${{ inputs.bundle_dir }}/${{ inputs.package_path }}/Dockerfile
|
file: ${{ steps.bundle-dir.outputs.temp_dir }}/${{ inputs.package_path }}/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
name: Reusable Run E2E Test Suite Workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
snjs_image_tag:
|
||||||
|
type: string
|
||||||
|
default: latest
|
||||||
|
description: The Docker image tag used for SNJS container
|
||||||
|
secrets:
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
required: true
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
required: true
|
||||||
|
AWS_ACCESS_KEY_ID:
|
||||||
|
required: true
|
||||||
|
AWS_SECRET_ACCESS_KEY:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
e2e:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
database: [ "mysql", "sqlite" ]
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
services:
|
||||||
|
snjs:
|
||||||
|
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
|
||||||
|
ports:
|
||||||
|
- 9001:9001
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Run Server
|
||||||
|
run: docker compose -f docker-compose.ci.yml up -d
|
||||||
|
env:
|
||||||
|
DB_TYPE: ${{ matrix.database }}
|
||||||
|
|
||||||
|
- name: Wait for server to start
|
||||||
|
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs
|
||||||
|
|
||||||
|
- name: Run E2E Test Suite
|
||||||
|
run: yarn dlx mocha-headless-chrome --timeout 1200000 -f http://localhost:9001/mocha/test.html
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
name: Reusable Publish Docker Self Hosting Image Workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
required: true
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
required: true
|
||||||
|
AWS_ACCESS_KEY_ID:
|
||||||
|
required: true
|
||||||
|
AWS_SECRET_ACCESS_KEY:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@master
|
||||||
|
with:
|
||||||
|
platforms: all
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@master
|
||||||
|
|
||||||
|
- name: Publish Docker image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
builder: ${{ steps.buildx.outputs.name }}
|
||||||
|
context: .
|
||||||
|
file: Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
standardnotes/server:latest
|
||||||
|
standardnotes/server:${{ github.sha }}
|
||||||
@@ -17,9 +17,6 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
e2e_tag_parameter_name:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
package_path:
|
package_path:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@@ -36,177 +33,11 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
temp_dir: ${{ steps.bundle-dir.outputs.temp_dir }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Create Bundle Dir
|
|
||||||
id: bundle-dir
|
|
||||||
run: echo "temp_dir=$(mktemp -d -t ${{ inputs.service_name }}-${{ github.sha }}-XXXXXXX)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Cache build
|
|
||||||
id: cache-build
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
packages/**/dist
|
|
||||||
${{ steps.bundle-dir.outputs.temp_dir }}
|
|
||||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: yarn build ${{ inputs.package_path }}
|
|
||||||
|
|
||||||
- name: Bundle
|
|
||||||
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ steps.bundle-dir.outputs.temp_dir }}
|
|
||||||
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs: build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Cache build
|
|
||||||
id: cache-build
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
packages/**/dist
|
|
||||||
${{ needs.build.outputs.temp_dir }}
|
|
||||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
|
||||||
run: yarn build ${{ inputs.package_path }}
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: yarn lint:${{ inputs.service_name }}
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs: build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Cache build
|
|
||||||
id: cache-build
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
packages/**/dist
|
|
||||||
${{ needs.build.outputs.temp_dir }}
|
|
||||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
|
||||||
run: yarn build ${{ inputs.package_path }}
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: yarn test ${{ inputs.package_path }}
|
|
||||||
|
|
||||||
e2e:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs: build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Cache build
|
|
||||||
id: cache-build
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
packages/**/dist
|
|
||||||
${{ needs.build.outputs.temp_dir }}
|
|
||||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
|
||||||
run: yarn build ${{ inputs.package_path }}
|
|
||||||
|
|
||||||
- name: Bundle
|
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
|
||||||
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ needs.build.outputs.temp_dir }}
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@master
|
|
||||||
with:
|
|
||||||
platforms: all
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@master
|
|
||||||
|
|
||||||
- name: Publish Docker image for E2E testing
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
|
||||||
context: ${{ needs.build.outputs.temp_dir }}
|
|
||||||
file: ${{ needs.build.outputs.temp_dir }}/${{ inputs.package_path }}/Dockerfile
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
push: true
|
|
||||||
tags: standardnotes/${{ inputs.service_name }}:${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Run E2E test suite
|
|
||||||
uses: convictional/trigger-workflow-and-wait@master
|
|
||||||
with:
|
|
||||||
owner: standardnotes
|
|
||||||
repo: self-hosted
|
|
||||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
|
||||||
workflow_file_name: testing-with-updating-client-and-server.yml
|
|
||||||
wait_interval: 30
|
|
||||||
client_payload: '{"${{ inputs.e2e_tag_parameter_name }}": "${{ github.sha }}"}'
|
|
||||||
propagate_failure: true
|
|
||||||
trigger_workflow: true
|
|
||||||
wait_workflow: true
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs: [ build, test, lint, e2e ]
|
|
||||||
|
|
||||||
name: Publish Docker Image
|
name: Publish Docker Image
|
||||||
uses: standardnotes/server/.github/workflows/common-docker-image.yml@main
|
uses: standardnotes/server/.github/workflows/common-docker-image.yml@main
|
||||||
with:
|
with:
|
||||||
service_name: ${{ inputs.service_name }}
|
service_name: ${{ inputs.service_name }}
|
||||||
bundle_dir: ${{ needs.build.outputs.temp_dir }}
|
|
||||||
package_path: ${{ inputs.package_path }}
|
package_path: ${{ inputs.package_path }}
|
||||||
workspace_name: ${{ inputs.workspace_name }}
|
workspace_name: ${{ inputs.workspace_name }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
@@ -1,164 +0,0 @@
|
|||||||
name: Reusable Server Utility Workflow
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
service_name:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
workspace_name:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
deploy_web:
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
deploy_worker:
|
|
||||||
required: false
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
package_path:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
secrets:
|
|
||||||
DOCKER_USERNAME:
|
|
||||||
required: true
|
|
||||||
DOCKER_PASSWORD:
|
|
||||||
required: true
|
|
||||||
CI_PAT_TOKEN:
|
|
||||||
required: true
|
|
||||||
AWS_ACCESS_KEY_ID:
|
|
||||||
required: true
|
|
||||||
AWS_SECRET_ACCESS_KEY:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
temp_dir: ${{ steps.bundle-dir.outputs.temp_dir }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Create Bundle Dir
|
|
||||||
id: bundle-dir
|
|
||||||
run: echo "temp_dir=$(mktemp -d -t ${{ inputs.service_name }}-${{ github.sha }}-XXXXXXX)" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Cache build
|
|
||||||
id: cache-build
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
packages/**/dist
|
|
||||||
${{ steps.bundle-dir.outputs.temp_dir }}
|
|
||||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: yarn build ${{ inputs.package_path }}
|
|
||||||
|
|
||||||
- name: Bundle
|
|
||||||
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ steps.bundle-dir.outputs.temp_dir }}
|
|
||||||
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs: build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Cache build
|
|
||||||
id: cache-build
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
packages/**/dist
|
|
||||||
${{ needs.build.outputs.temp_dir }}
|
|
||||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
|
||||||
run: yarn build ${{ inputs.package_path }}
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: yarn lint:${{ inputs.service_name }}
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
needs: build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Cache build
|
|
||||||
id: cache-build
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
packages/**/dist
|
|
||||||
${{ needs.build.outputs.temp_dir }}
|
|
||||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
|
||||||
|
|
||||||
- name: Set up Node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
|
||||||
run: yarn build ${{ inputs.package_path }}
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: yarn test ${{ inputs.package_path }}
|
|
||||||
|
|
||||||
publish:
|
|
||||||
needs: [ build, test, lint ]
|
|
||||||
|
|
||||||
name: Publish Docker Image
|
|
||||||
uses: standardnotes/server/.github/workflows/common-docker-image.yml@main
|
|
||||||
with:
|
|
||||||
service_name: ${{ inputs.service_name }}
|
|
||||||
bundle_dir: ${{ needs.build.outputs.temp_dir }}
|
|
||||||
package_path: ${{ inputs.package_path }}
|
|
||||||
workspace_name: ${{ inputs.workspace_name }}
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
deploy-web:
|
|
||||||
if: ${{ inputs.deploy_web }}
|
|
||||||
|
|
||||||
needs: publish
|
|
||||||
|
|
||||||
name: Deploy Web
|
|
||||||
uses: standardnotes/server/.github/workflows/common-deploy.yml@main
|
|
||||||
with:
|
|
||||||
service_name: ${{ inputs.service_name }}
|
|
||||||
docker_image: ${{ inputs.service_name }}:${{ github.sha }}
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
deploy-worker:
|
|
||||||
if: ${{ inputs.deploy_worker }}
|
|
||||||
|
|
||||||
needs: publish
|
|
||||||
|
|
||||||
name: Deploy Worker
|
|
||||||
uses: standardnotes/server/.github/workflows/common-deploy.yml@main
|
|
||||||
with:
|
|
||||||
service_name: ${{ inputs.service_name }}-worker
|
|
||||||
docker_image: ${{ inputs.service_name }}:${{ github.sha }}
|
|
||||||
secrets: inherit
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
name: E2E Test Suite On Self Hosted Server
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 */12 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
snjs_image_tag:
|
||||||
|
type: string
|
||||||
|
default: latest
|
||||||
|
description: The Docker image tag used for SNJS container
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
e2e:
|
||||||
|
name: E2E
|
||||||
|
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
||||||
|
with:
|
||||||
|
snjs_image_tag: ${{ inputs.snjs_image_tag || 'latest' }}
|
||||||
|
secrets: inherit
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
name: Event Store
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: event-store
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*standardnotes/event-store*'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
call_server_utility_workflow:
|
|
||||||
name: Server Utility
|
|
||||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
|
||||||
with:
|
|
||||||
service_name: event-store
|
|
||||||
workspace_name: "@standardnotes/event-store"
|
|
||||||
deploy_web: false
|
|
||||||
package_path: packages/event-store
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
newrelic:
|
|
||||||
needs: call_server_utility_workflow
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Create New Relic deployment marker for Worker
|
|
||||||
uses: newrelic/deployment-marker-action@v1
|
|
||||||
with:
|
|
||||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
|
||||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
|
||||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_EVENT_STORE_PROD }}
|
|
||||||
revision: "${{ github.sha }}"
|
|
||||||
description: "Automated Deployment via Github Actions"
|
|
||||||
user: "${{ github.actor }}"
|
|
||||||
@@ -17,7 +17,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
service_name: files
|
service_name: files
|
||||||
workspace_name: "@standardnotes/files-server"
|
workspace_name: "@standardnotes/files-server"
|
||||||
e2e_tag_parameter_name: files_image_tag
|
|
||||||
package_path: packages/files
|
package_path: packages/files
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
|||||||
+86
-14
@@ -6,19 +6,91 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v3
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Set up Node
|
- name: Cache build
|
||||||
uses: actions/setup-node@v3
|
id: cache-build
|
||||||
with:
|
uses: actions/cache@v3
|
||||||
registry-url: 'https://registry.npmjs.org'
|
with:
|
||||||
node-version-file: '.nvmrc'
|
path: |
|
||||||
- name: ESLint
|
packages/**/dist
|
||||||
run: yarn lint
|
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||||
- name: Build
|
|
||||||
run: yarn build
|
- name: Set up Node
|
||||||
- name: Test
|
uses: actions/setup-node@v3
|
||||||
run: yarn test
|
with:
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Cache build
|
||||||
|
id: cache-build
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
packages/**/dist
|
||||||
|
${{ needs.build.outputs.temp_dir }}
|
||||||
|
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: yarn lint
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Cache build
|
||||||
|
id: cache-build
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
packages/**/dist
|
||||||
|
${{ needs.build.outputs.temp_dir }}
|
||||||
|
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: yarn test
|
||||||
|
|
||||||
|
e2e:
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
name: E2E
|
||||||
|
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
||||||
|
secrets: inherit
|
||||||
|
|||||||
@@ -5,9 +5,106 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release_and_publish:
|
build:
|
||||||
if: contains(github.event.head_commit.message, 'chore(release)') == false
|
if: contains(github.event.head_commit.message, 'chore(release)') == false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Cache build
|
||||||
|
id: cache-build
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
packages/**/dist
|
||||||
|
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Cache build
|
||||||
|
id: cache-build
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
packages/**/dist
|
||||||
|
${{ needs.build.outputs.temp_dir }}
|
||||||
|
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: yarn lint
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
needs: build
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Cache build
|
||||||
|
id: cache-build
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
packages/**/dist
|
||||||
|
${{ needs.build.outputs.temp_dir }}
|
||||||
|
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: yarn test
|
||||||
|
|
||||||
|
e2e:
|
||||||
|
needs: build
|
||||||
|
name: E2E
|
||||||
|
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
publish-self-hosting:
|
||||||
|
needs: [ test, lint, e2e ]
|
||||||
|
name: Publish Self Hosting Docker Image
|
||||||
|
uses: standardnotes/server/.github/workflows/common-self-hosting.yml@main
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
publish-services:
|
||||||
|
needs: [ test, lint, e2e ]
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -34,7 +131,8 @@ jobs:
|
|||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: 'https://registry.npmjs.org'
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Build packages
|
- name: Build
|
||||||
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
||||||
- name: Bump version
|
- name: Bump version
|
||||||
@@ -44,4 +142,3 @@ jobs:
|
|||||||
run: yarn publish
|
run: yarn publish
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
service_name: revisions
|
service_name: revisions
|
||||||
workspace_name: "@standardnotes/revisions-server"
|
workspace_name: "@standardnotes/revisions-server"
|
||||||
e2e_tag_parameter_name: revisions_image_tag
|
|
||||||
package_path: packages/revisions
|
package_path: packages/revisions
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call_server_utility_workflow:
|
call_server_application_workflow:
|
||||||
name: Server Utility
|
name: Server Application
|
||||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
|
||||||
with:
|
with:
|
||||||
service_name: scheduler
|
service_name: scheduler
|
||||||
workspace_name: "@standardnotes/scheduler-server"
|
workspace_name: "@standardnotes/scheduler-server"
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
newrelic:
|
newrelic:
|
||||||
needs: call_server_utility_workflow
|
needs: call_server_application_workflow
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
service_name: syncing-server-js
|
service_name: syncing-server-js
|
||||||
workspace_name: "@standardnotes/syncing-server"
|
workspace_name: "@standardnotes/syncing-server"
|
||||||
e2e_tag_parameter_name: syncing_server_js_image_tag
|
|
||||||
package_path: packages/syncing-server
|
package_path: packages/syncing-server
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call_server_utility_workflow:
|
call_server_application_workflow:
|
||||||
name: Server Utility
|
name: Server Application
|
||||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
|
||||||
with:
|
with:
|
||||||
service_name: websockets
|
service_name: websockets
|
||||||
workspace_name: "@standardnotes/websockets-server"
|
workspace_name: "@standardnotes/websockets-server"
|
||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
newrelic:
|
newrelic:
|
||||||
needs: call_server_utility_workflow
|
needs: call_server_application_workflow
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
name: Workspace Server
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: workspace
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '*standardnotes/workspace-server*'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
call_server_utility_workflow:
|
|
||||||
name: Server Utility
|
|
||||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
|
||||||
with:
|
|
||||||
service_name: workspace
|
|
||||||
workspace_name: "@standardnotes/workspace-server"
|
|
||||||
package_path: packages/workspace
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
newrelic:
|
|
||||||
needs: call_server_utility_workflow
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Create New Relic deployment marker for Web
|
|
||||||
uses: newrelic/deployment-marker-action@v1
|
|
||||||
with:
|
|
||||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
|
||||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
|
||||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WEB_PROD }}
|
|
||||||
revision: "${{ github.sha }}"
|
|
||||||
description: "Automated Deployment via Github Actions"
|
|
||||||
user: "${{ github.actor }}"
|
|
||||||
|
|
||||||
- name: Create New Relic deployment marker for Worker
|
|
||||||
uses: newrelic/deployment-marker-action@v1
|
|
||||||
with:
|
|
||||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
|
||||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
|
||||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WORKER_PROD }}
|
|
||||||
revision: "${{ github.sha }}"
|
|
||||||
description: "Automated Deployment via Github Actions"
|
|
||||||
user: "${{ github.actor }}"
|
|
||||||
@@ -20,3 +20,10 @@ packages/files/uploads/*
|
|||||||
|
|
||||||
data/*
|
data/*
|
||||||
!data/.gitkeep
|
!data/.gitkeep
|
||||||
|
|
||||||
|
packages/**/data/*
|
||||||
|
|
||||||
|
logs/*
|
||||||
|
!logs/.gitkeep
|
||||||
|
|
||||||
|
docker-compose.yml
|
||||||
|
|||||||
Vendored
+2
-1
@@ -6,5 +6,6 @@
|
|||||||
"eslint.nodePath": ".yarn/sdks",
|
"eslint.nodePath": ".yarn/sdks",
|
||||||
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
|
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
|
||||||
"typescript.tsdk": ".yarn/sdks/typescript/lib",
|
"typescript.tsdk": ".yarn/sdks/typescript/lib",
|
||||||
"typescript.enablePromptUseWorkspaceTsdk": true
|
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||||
|
"terraform.languageServer.enable": false
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user