Compare commits

..

93 Commits

Author SHA1 Message Date
standardci
7e1fcebdd8 chore(release): publish new version
- @standardnotes/api-gateway@1.6.1
 - @standardnotes/auth-server@1.8.0
 - @standardnotes/common@1.25.0
 - @standardnotes/domain-events-infra@1.7.5
 - @standardnotes/domain-events@2.39.0
 - @standardnotes/files-server@1.4.0
 - @standardnotes/predicates@1.2.0
 - @standardnotes/scheduler-server@1.5.0
 - @standardnotes/security@1.2.0
 - @standardnotes/syncing-server@1.5.0
2022-07-06 10:04:10 +00:00
Karol Sójko
fd4ee2123d feat: add common package 2022-07-06 12:02:39 +02:00
standardci
62caa840ef chore(release): publish new version
- @standardnotes/api-gateway@1.6.0
 - @standardnotes/auth-server@1.7.0
 - @standardnotes/files-server@1.3.0
 - @standardnotes/scheduler-server@1.4.0
 - @standardnotes/syncing-server@1.4.0
 - @standardnotes/time@1.9.0
2022-07-06 09:47:24 +00:00
Karol Sójko
565e890973 feat: add time package 2022-07-06 11:46:04 +02:00
standardci
84c4642ced chore(release): publish new version
- @standardnotes/api-gateway@1.5.0
 - @standardnotes/auth-server@1.6.0
 - @standardnotes/domain-events-infra@1.7.4
 - @standardnotes/domain-events@2.38.0
 - @standardnotes/files-server@1.2.0
 - @standardnotes/scheduler-server@1.3.2
 - @standardnotes/security@1.1.0
 - @standardnotes/syncing-server@1.3.0
2022-07-06 09:28:38 +00:00
Karol Sójko
699164eba5 fix: deps to @standarnotes/security 2022-07-06 11:27:19 +02:00
Karol Sójko
d86928f1b4 feat: add security package 2022-07-06 11:24:32 +02:00
standardci
06fc077f1b chore(release): publish new version
- @standardnotes/analytics@1.8.1
 - @standardnotes/api-gateway@1.4.2
 - @standardnotes/auth-server@1.5.1
 - @standardnotes/domain-events-infra@1.7.3
 - @standardnotes/domain-events@2.37.1
 - @standardnotes/files-server@1.1.14
 - @standardnotes/predicates@1.1.1
 - @standardnotes/scheduler-server@1.3.1
 - @standardnotes/syncing-server@1.2.2
2022-07-06 09:20:41 +00:00
Karol Sójko
97ba31f345 fix: files included in distributable packages 2022-07-06 11:19:05 +02:00
standardci
a8795defc1 chore(release): publish new version
- @standardnotes/api-gateway@1.4.1
 - @standardnotes/auth-server@1.5.0
 - @standardnotes/domain-events-infra@1.7.2
 - @standardnotes/domain-events@2.37.0
 - @standardnotes/files-server@1.1.13
 - @standardnotes/predicates@1.1.0
 - @standardnotes/scheduler-server@1.3.0
 - @standardnotes/syncing-server@1.2.1
2022-07-06 08:52:19 +00:00
Karol Sójko
1b35cf7a39 fix: scheduler to predicates imports 2022-07-06 10:51:02 +02:00
Karol Sójko
ed62ed516f feat: add predicates package 2022-07-06 10:49:22 +02:00
standardci
b4f1c6f7f8 chore(release): publish new version
- @standardnotes/analytics@1.8.0
 - @standardnotes/api-gateway@1.4.0
 - @standardnotes/auth-server@1.4.0
 - @standardnotes/domain-events-infra@1.7.1
 - @standardnotes/domain-events@2.36.0
 - @standardnotes/files-server@1.1.12
 - @standardnotes/scheduler-server@1.2.7
 - @standardnotes/syncing-server@1.2.0
2022-07-06 08:37:46 +00:00
Karol Sójko
14e4ca70b4 feat: add analytics package 2022-07-06 10:36:32 +02:00
Karol Sójko
12fa94539b fix: build process due to composite packages 2022-07-06 10:29:06 +02:00
standardci
e40a2459c0 chore(release): publish new version
- @standardnotes/api-gateway@1.3.5
 - @standardnotes/auth-server@1.3.14
 - @standardnotes/domain-events-infra@1.7.0
 - @standardnotes/files-server@1.1.11
 - @standardnotes/scheduler-server@1.2.6
 - @standardnotes/syncing-server@1.1.11
2022-07-06 08:23:01 +00:00
Karol Sójko
cffa6dc494 fix: add unplugged packages for a zero-install setup 2022-07-06 10:21:35 +02:00
Karol Sójko
d818799418 fix: testing project packages 2022-07-06 10:21:33 +02:00
Karol Sójko
808d18e7cd feat: add domain-event-infra package 2022-07-06 10:20:51 +02:00
standardci
d40c4ac0ed chore(release): publish new version
- @standardnotes/api-gateway@1.3.4
 - @standardnotes/auth-server@1.3.13
 - @standardnotes/domain-events@2.35.0
 - @standardnotes/files-server@1.1.10
 - @standardnotes/scheduler-server@1.2.5
 - @standardnotes/syncing-server@1.1.10
2022-07-06 08:10:05 +00:00
Karol Sójko
caaad9205c fix: publishing setup 2022-07-06 10:07:44 +02:00
Karol Sójko
8a47c4bb41 feat: add domain-events package 2022-07-06 10:03:57 +02:00
standardci
f7b3b9c4eb chore(release): publish new version
- @standardnotes/api-gateway@1.3.3
 - @standardnotes/auth-server@1.3.12
 - @standardnotes/files-server@1.1.9
 - @standardnotes/scheduler-server@1.2.4
 - @standardnotes/syncing-server@1.1.9
2022-07-04 11:19:35 +00:00
Karol Sójko
099430c764 Merge pull request #6 from standardnotes/create-pull-request/patch
chore(deps): upgrade snjs
2022-07-04 13:19:06 +02:00
standardci
deca3ebd64 chore(deps): upgrade snjs 2022-07-04 11:10:21 +00:00
standardci
79dd3d02e3 chore(release): publish new version
- @standardnotes/auth-server@1.3.11
2022-06-30 07:37:10 +00:00
Karol Sójko
f49299fa91 fix: email sending procedure to not include creating mute_marketing_emails anymore 2022-06-30 09:31:32 +02:00
standardci
250f408228 chore(release): publish new version
- @standardnotes/auth-server@1.3.10
2022-06-30 05:21:27 +00:00
Karol Sójko
26f8b75bed fix: adjust callback in processing email campaigns 2022-06-30 07:20:50 +02:00
standardci
f541c2f7c1 chore(release): publish new version
- @standardnotes/auth-server@1.3.9
2022-06-29 13:56:40 +00:00
Karol Sójko
997ffc02a3 fix: wrap processing email campaigns into try-catch 2022-06-29 15:55:51 +02:00
standardci
fa6335d6ac chore(release): publish new version
- @standardnotes/auth-server@1.3.8
2022-06-29 13:15:58 +00:00
Karol Sójko
57694bdc14 fix: temporarily send email campaings only for users without the mute_marketing_emails setting 2022-06-29 15:15:00 +02:00
standardci
eed243d43b chore(release): publish new version
- @standardnotes/auth-server@1.3.7
2022-06-29 12:33:40 +00:00
Karol Sójko
37e21f6505 fix: setting encryption version when muting marketing emails 2022-06-29 14:33:05 +02:00
standardci
d25e14147c chore(release): publish new version
- @standardnotes/auth-server@1.3.6
2022-06-29 11:56:00 +00:00
Karol Sójko
1d4bce7309 fix: mute marketing value encryption version setting 2022-06-29 13:55:09 +02:00
standardci
8c0c56930e chore(release): publish new version
- @standardnotes/auth-server@1.3.5
2022-06-29 11:31:29 +00:00
Karol Sójko
2e9255344e fix: add logs for processing email campaigns 2022-06-29 13:30:41 +02:00
standardci
346a7cabe1 chore(release): publish new version
- @standardnotes/api-gateway@1.3.2
2022-06-28 12:55:13 +00:00
Karol Sójko
4a430b2701 fix: checking for html content-type 2022-06-28 14:54:38 +02:00
standardci
bb53e88a4e chore(release): publish new version
- @standardnotes/api-gateway@1.3.1
 - @standardnotes/auth-server@1.3.4
 - @standardnotes/files-server@1.1.8
 - @standardnotes/scheduler-server@1.2.3
 - @standardnotes/syncing-server@1.1.8
2022-06-28 12:20:39 +00:00
Karol Sójko
cfd04a5b39 Merge pull request #2 from standardnotes/create-pull-request/patch
chore(deps): upgrade snjs
2022-06-28 14:19:54 +02:00
standardci
e0f2d5e202 chore(release): publish new version
- @standardnotes/api-gateway@1.3.0
2022-06-28 12:11:19 +00:00
Karol Sójko
3035cbc5de feat: remove api metadata decorating html responses 2022-06-28 14:10:40 +02:00
standardci
7c271be310 chore(release): publish new version
- @standardnotes/auth-server@1.3.3
2022-06-28 10:09:14 +00:00
Karol Sójko
ba373ebc6b fix: change response type to html for muting marketing emails 2022-06-28 12:08:36 +02:00
Karol Sójko
2450d88a29 fix: install to be immutable 2022-06-28 11:13:06 +02:00
Karol Sójko
376a59c182 fix: add origin meta property to daily analytics event 2022-06-28 11:12:18 +02:00
standardci
d584ca57f1 chore(deps): upgrade snjs 2022-06-28 08:50:24 +00:00
Mo
c50662849b Merge pull request #4 from standardnotes/chore/pr-workflow
chore: add pr workflow
2022-06-27 17:12:23 -05:00
Mo
82da690139 chore: add pr workflow 2022-06-27 17:04:39 -05:00
standardci
b11a9b0eac chore(release): publish new version
- @standardnotes/auth-server@1.3.2
2022-06-27 22:02:46 +00:00
Mo
d7653474c3 Merge pull request #3 from standardnotes/chore/upgrade-features
chore: upgrade features package
2022-06-27 17:01:41 -05:00
Mo
ce2fd86ca3 chore: upgrade features package 2022-06-27 17:01:21 -05:00
standardci
c9c496c63f chore(release): publish new version
- @standardnotes/api-gateway@1.2.2
 - @standardnotes/auth-server@1.3.1
 - @standardnotes/files-server@1.1.7
 - @standardnotes/scheduler-server@1.2.2
 - @standardnotes/syncing-server@1.1.7
2022-06-27 21:57:06 +00:00
Mo
b1c9f8ca6e Merge pull request #1 from standardnotes/chore/snjs-workflow
chore: upgrade snjs event workflow
2022-06-27 16:56:33 -05:00
Mo
e84bd73a39 chore: add snjs workflow event handler 2022-06-27 16:53:57 -05:00
Mo
c69d1b02fb chore: add ini dep for ncu 2022-06-27 16:52:20 -05:00
Mo
b590d33b88 chore: ncu version 2022-06-27 16:48:02 -05:00
Mo
c1e7a3eb7e chore: add ncu to each package 2022-06-27 16:47:19 -05:00
Mo
fd743a9d5e chore: add npm-check-updates dev dep 2022-06-27 16:44:43 -05:00
standardci
4c40fd5186 chore(release): publish new version
- @standardnotes/api-gateway@1.2.1
2022-06-27 10:27:36 +00:00
Karol Sójko
2cb470b99e fix: issue with NaN error code responses 2022-06-27 12:27:00 +02:00
standardci
b6539f8795 chore(release): publish new version
- @standardnotes/auth-server@1.3.0
2022-06-27 10:18:23 +00:00
Karol Sójko
6d7de4a8da feat: add endpoint for muting marketing emails 2022-06-27 12:17:47 +02:00
standardci
41999f36f0 chore(release): publish new version
- @standardnotes/api-gateway@1.2.0
 - @standardnotes/auth-server@1.2.1
2022-06-27 10:07:19 +00:00
Karol Sójko
fa2a8da17b feat: add endpoint to mute marketing emails 2022-06-27 12:06:33 +02:00
Karol Sójko
214684eae7 fix: add setting uuid to email requests 2022-06-27 12:06:33 +02:00
standardci
b3a92af04d chore(release): publish new version
- @standardnotes/auth-server@1.2.0
2022-06-27 09:57:22 +00:00
Karol Sójko
210a314c81 feat: add docker commands to start sending emails 2022-06-27 11:56:42 +02:00
standardci
46cba52bcb chore(release): publish new version
- @standardnotes/auth-server@1.1.7
2022-06-27 08:44:03 +00:00
Karol Sójko
bf14ec05f9 fix: add sending out email campaigns 2022-06-27 10:43:23 +02:00
standardci
6f88a96c3e chore(release): publish new version
- @standardnotes/scheduler-server@1.2.1
2022-06-27 07:42:47 +00:00
Karol Sójko
e12c9c47a7 fix: change subscription encouragement scheduled from 14 to 30 days 2022-06-27 09:42:08 +02:00
standardci
83085052f8 chore(release): publish new version
- @standardnotes/api-gateway@1.1.6
 - @standardnotes/auth-server@1.1.6
 - @standardnotes/files-server@1.1.6
 - @standardnotes/scheduler-server@1.2.0
 - @standardnotes/syncing-server@1.1.6
2022-06-27 07:25:46 +00:00
Karol Sójko
eda618d845 Merge branch 'main' of github.com:standardnotes/server 2022-06-27 09:25:04 +02:00
Karol Sójko
8d4280f4ca feat: add context for requesting email message 2022-06-27 09:24:43 +02:00
standardci
b57816bba4 chore(release): publish new version
- @standardnotes/api-gateway@1.1.5
 - @standardnotes/auth-server@1.1.5
 - @standardnotes/files-server@1.1.5
 - @standardnotes/scheduler-server@1.1.5
 - @standardnotes/syncing-server@1.1.5
2022-06-27 04:59:52 +00:00
Karol Sójko
b6db194a22 fix: upgrade sentry node sdk 2022-06-27 06:59:15 +02:00
standardci
8f708164cd chore(release): publish new version
- @standardnotes/api-gateway@1.1.4
 - @standardnotes/auth-server@1.1.4
 - @standardnotes/files-server@1.1.4
 - @standardnotes/scheduler-server@1.1.4
 - @standardnotes/syncing-server@1.1.4
2022-06-24 13:19:23 +00:00
Karol Sójko
ff09ae0a47 fix: newrelic deps and setup db and cache for local development purposes 2022-06-24 15:18:41 +02:00
Karol Sójko
d21d752029 fix: newrelic deploy markers on syncing-server 2022-06-23 19:42:23 +02:00
standardci
2ea077a7cd chore(release): publish new version
- @standardnotes/api-gateway@1.1.3
 - @standardnotes/auth-server@1.1.3
 - @standardnotes/files-server@1.1.3
 - @standardnotes/scheduler-server@1.1.3
 - @standardnotes/syncing-server@1.1.3
2022-06-23 17:23:35 +00:00
Karol Sójko
0d67c55e12 fix: curl in the final image 2022-06-23 19:22:52 +02:00
Karol Sójko
8837dca039 fix: pushing tags one by one on release 2022-06-23 18:55:55 +02:00
standardci
c9ec846a3c chore(release): publish new version
- @standardnotes/api-gateway@1.1.2
 - @standardnotes/auth-server@1.1.2
 - @standardnotes/files-server@1.1.2
 - @standardnotes/scheduler-server@1.1.2
 - @standardnotes/syncing-server@1.1.2
2022-06-23 16:49:22 +00:00
Karol Sójko
786829f317 fix: workflow step names in scheduler 2022-06-23 18:48:37 +02:00
Karol Sójko
10891af33b Merge branch 'main' of github.com:standardnotes/server 2022-06-23 18:47:18 +02:00
Karol Sójko
3f091175e2 fix: workflow step names 2022-06-23 18:47:13 +02:00
standardci
0e5d7c918b chore(release): publish new version
- @standardnotes/api-gateway@1.1.1
 - @standardnotes/auth-server@1.1.1
 - @standardnotes/files-server@1.1.1
 - @standardnotes/scheduler-server@1.1.1
 - @standardnotes/syncing-server@1.1.1
2022-06-23 16:40:39 +00:00
Karol Sójko
fd2358a4b8 Merge branch 'main' of github.com:standardnotes/server 2022-06-23 18:39:49 +02:00
Karol Sójko
dd36b1859c feat: prepare auth for one branch only development 2022-06-23 18:39:42 +02:00
1139 changed files with 120294 additions and 3265 deletions

6
.env.sample Normal file
View File

@@ -0,0 +1,6 @@
DB_PORT=3306
DB_USERNAME=std_notes_user
DB_PASSWORD=changeme123
DB_DATABASE=standard_notes_db
REDIS_PORT=6379

View File

@@ -16,9 +16,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- run: yarn build
- run: yarn lint:api-gateway
publish-aws-ecr:
@@ -29,7 +32,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:api-gateway
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
@@ -59,7 +62,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:api-gateway
run: yarn build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:

View File

@@ -1,14 +1,13 @@
name: Auth Server Dev
name: Auth Server
concurrency:
group: auth_dev_environment
group: auth
cancel-in-progress: true
on:
push:
tags:
- '@standardnotes/auth-server@[0-9]*.[0-9]*.[0-9]*-alpha.[0-9]*'
- '@standardnotes/auth-server@[0-9]*.[0-9]*.[0-9]*-beta.[0-9]*'
- '*standardnotes/auth-server*'
workflow_dispatch:
jobs:
@@ -17,9 +16,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- run: yarn build
- run: yarn lint:auth
- run: yarn test:auth
@@ -31,7 +33,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:auth
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
@@ -50,8 +52,8 @@ jobs:
run: |
yarn docker build @standardnotes/auth-server -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:dev
docker push $ECR_REGISTRY/$ECR_REPOSITORY:dev
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REPOSITORY:latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
publish-docker-hub:
needs: test
@@ -61,7 +63,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:auth
run: yarn build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
@@ -71,8 +73,8 @@ jobs:
run: |
yarn docker build @standardnotes/auth-server -t standardnotes/auth:${{ github.sha }}
docker push standardnotes/auth:${{ github.sha }}
docker tag standardnotes/auth:${{ github.sha }} standardnotes/auth:dev
docker push standardnotes/auth:dev
docker tag standardnotes/auth:${{ github.sha }} standardnotes/auth:latest
docker push standardnotes/auth:latest
deploy-web:
needs: publish-aws-ecr
@@ -86,26 +88,46 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Download task definition
- name: DEV - Download task definition
run: |
aws ecs describe-task-definition --task-definition auth-dev --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
- name: DEV - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="auth-dev") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
- name: DEV - Fill in the new image ID in the Amazon ECS task definition
id: task-def-dev
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: auth-dev
image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }}
- name: Deploy Amazon ECS task definition
- name: DEV - Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
task-definition: ${{ steps.task-def-dev.outputs.task-definition }}
service: auth-dev
cluster: dev
wait-for-service-stability: true
- name: PROD - Download task definition
run: |
aws ecs describe-task-definition --task-definition auth-prod --query taskDefinition > task-definition.json
- name: PROD - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="auth-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: PROD - Fill in the new image ID in the Amazon ECS task definition
id: task-def-prod
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: auth-prod
image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }}
- name: PROD - Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
service: auth-prod
cluster: prod
wait-for-service-stability: true
deploy-worker:
needs: publish-aws-ecr
@@ -119,26 +141,46 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Download task definition
- name: DEV - Download task definition
run: |
aws ecs describe-task-definition --task-definition auth-worker-dev --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
- name: DEV - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="auth-worker-dev") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
- name: DEV - Fill in the new image ID in the Amazon ECS task definition
id: task-def-dev
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: auth-worker-dev
image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }}
- name: Deploy Amazon ECS task definition
- name: DEV - Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
task-definition: ${{ steps.task-def-dev.outputs.task-definition }}
service: auth-worker-dev
cluster: dev
wait-for-service-stability: true
- name: PROD - Download task definition
run: |
aws ecs describe-task-definition --task-definition auth-worker-prod --query taskDefinition > task-definition.json
- name: PROD - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="auth-worker-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: PROD - Fill in the new image ID in the Amazon ECS task definition
id: task-def-prod
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: auth-worker-prod
image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }}
- name: PROD - Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
service: auth-worker-prod
cluster: prod
wait-for-service-stability: true
newrelic:
needs: [ deploy-web, deploy-worker ]
@@ -150,7 +192,7 @@ jobs:
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_AUTH_WEB_DEV }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_AUTH_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
@@ -159,7 +201,7 @@ jobs:
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_AUTH_WORKER_DEV }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_AUTH_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -16,9 +16,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- run: yarn build
- run: yarn lint:files
- run: yarn test:files
@@ -30,7 +33,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:files
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
@@ -60,7 +63,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:files
run: yarn build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:

19
.github/workflows/pr.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Pull Request
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: ESLint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test

View File

@@ -1,11 +1,11 @@
name: Version Bump
name: Publish Packages
on:
push:
branches: [ main ]
jobs:
bump:
release_and_publish:
if: contains(github.event.head_commit.message, 'chore(release)') == false
runs-on: ubuntu-latest
steps:
@@ -28,12 +28,20 @@ jobs:
git_user_signingkey: true
git_commit_gpgsign: true
- uses: actions/setup-node@v1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install locally
run: yarn install --immutable
- name: Build packages
run: yarn build
- name: Bump version
run: yarn release
- name: Publish
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_TOKEN }}
- name: Bump Version
run: yarn release:prod

View File

@@ -16,9 +16,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- run: yarn build
- run: yarn lint:scheduler
- run: yarn test:scheduler
@@ -30,7 +33,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:scheduler
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
@@ -60,7 +63,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:scheduler
run: yarn build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
@@ -88,7 +91,7 @@ jobs:
- name: DEV - Download task definition
run: |
aws ecs describe-task-definition --task-definition scheduler-worker-dev --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
- name: DEV - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="scheduler-worker-dev") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: DEV - Fill in the new image ID in the Amazon ECS task definition
@@ -108,7 +111,7 @@ jobs:
- name: PROD - Download task definition
run: |
aws ecs describe-task-definition --task-definition scheduler-worker-prod --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
- name: PROD - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="scheduler-worker-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: PROD - Fill in the new image ID in the Amazon ECS task definition

View File

@@ -0,0 +1,46 @@
name: Update SNJS Packages
on:
workflow_dispatch:
repository_dispatch:
types: [snjs-updated-event]
jobs:
SNJSUpdateEvent:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.CI_PAT_TOKEN }}
- uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
- name: Setup git config
run: |
git config --global user.name "standardci"
git config --global user.email "ci@standardnotes.com"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- run: yarn install
- run: |
yarn upgrade:snjs
yarn install --no-immutable
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.CI_PAT_TOKEN }}
title: "${{ 'chore(deps): upgrade snjs' }}"
body: Updates all packages prefixed with "@standardnotes/"
commit-message: "${{ 'chore(deps): upgrade snjs' }}"
delete-branch: true
committer: standardci <ci@standardnotes.com>
author: standardci <ci@standardnotes.com>

View File

@@ -16,10 +16,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
- run: yarn install --immutable
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- run: yarn build
- run: yarn lint:syncing-server
- run: yarn test:syncing-server
@@ -31,7 +33,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:syncing-server
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
@@ -61,7 +63,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build locally
run: yarn build:syncing-server
run: yarn build
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
@@ -89,7 +91,7 @@ jobs:
- name: DEV - Download task definition
run: |
aws ecs describe-task-definition --task-definition syncing-server-js-dev --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
- name: DEV - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="syncing-server-js-dev") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: DEV - Fill in the new image ID in the Amazon ECS task definition
@@ -109,7 +111,7 @@ jobs:
- name: PROD - Download task definition
run: |
aws ecs describe-task-definition --task-definition syncing-server-js-prod --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
- name: PROD - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="syncing-server-js-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: PROD - Fill in the new image ID in the Amazon ECS task definition
@@ -142,7 +144,7 @@ jobs:
- name: DEV - Download task definition
run: |
aws ecs describe-task-definition --task-definition syncing-server-js-worker-dev --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
- name: DEV - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="syncing-server-js-worker-dev") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: DEV - Fill in the new image ID in the Amazon ECS task definition
@@ -162,7 +164,7 @@ jobs:
- name: PROD - Download task definition
run: |
aws ecs describe-task-definition --task-definition syncing-server-js-worker-prod --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
- name: PROD - Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="syncing-server-js-worker-prod") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
- name: PROD - Fill in the new image ID in the Amazon ECS task definition
@@ -185,25 +187,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: DEV - 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_SYNCING_SERVER_WEB_DEV }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: DEV - 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_SYNCING_SERVER_WORKER_DEV }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: PROD - Create New Relic deployment marker for Web
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
@@ -212,7 +196,7 @@ jobs:
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: PROD - Create New Relic deployment marker for Worker
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}

4
.gitignore vendored
View File

@@ -1,7 +1,6 @@
.eslintcache
.DS_Store
.idea
node_modules
dist
coverage
.env
@@ -18,3 +17,6 @@ newrelic_agent.log
packages/files/uploads/*
!packages/files/uploads/.gitkeep
data/*
!data/.gitkeep

4658
.pnp.cjs generated

File diff suppressed because it is too large Load Diff

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.

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More