mirror of
https://github.com/standardnotes/server
synced 2026-02-06 20:02:09 -05:00
Compare commits
457 Commits
@standardn
...
@standardn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55587f6207 | ||
|
|
0d6b45c795 | ||
|
|
95f64d9952 | ||
|
|
54da5def4b | ||
|
|
d2fc1e057d | ||
|
|
0a90d98c71 | ||
|
|
cc269e3b35 | ||
|
|
b19093179b | ||
|
|
e2cc0bc003 | ||
|
|
644c52ae36 | ||
|
|
2554273a3f | ||
|
|
a8ee149d7a | ||
|
|
dcf92d58f9 | ||
|
|
053092031c | ||
|
|
c12e3eb3ec | ||
|
|
07def20f6b | ||
|
|
6c2cca66bd | ||
|
|
6efd336f34 | ||
|
|
81eb4be200 | ||
|
|
76cee6dbad | ||
|
|
dcc35a5738 | ||
|
|
5628de6445 | ||
|
|
53bea47727 | ||
|
|
d6cf8d400a | ||
|
|
b58cc335f2 | ||
|
|
03d1bc611c | ||
|
|
a48b09cefe | ||
|
|
d3f36c05df | ||
|
|
488ade25ab | ||
|
|
413a276d20 | ||
|
|
65675a21d6 | ||
|
|
d35de38289 | ||
|
|
83e1baa978 | ||
|
|
875edce5b1 | ||
|
|
1baa504728 | ||
|
|
965ae79414 | ||
|
|
7a8448c116 | ||
|
|
d935157ee8 | ||
|
|
9313e6b568 | ||
|
|
8033177f48 | ||
|
|
11011fa15d | ||
|
|
c2e9f3e72b | ||
|
|
f0fb7fd1cd | ||
|
|
15e342fd51 | ||
|
|
dfa7e06f87 | ||
|
|
a9aef5521b | ||
|
|
a628bdc44e | ||
|
|
db6f966045 | ||
|
|
9b602ed405 | ||
|
|
db15457ce4 | ||
|
|
719d8558a3 | ||
|
|
c207c3fc84 | ||
|
|
4bde4758c3 | ||
|
|
5eb957c82a | ||
|
|
0b38617acf | ||
|
|
377d32c449 | ||
|
|
cdfb0c2603 | ||
|
|
d85152429c | ||
|
|
422e596fc7 | ||
|
|
89334c9022 | ||
|
|
f5a0e88ab9 | ||
|
|
a59ba08339 | ||
|
|
2641056c51 | ||
|
|
5d812befc4 | ||
|
|
1c592d6f96 | ||
|
|
531f13fe1f | ||
|
|
4757cc8dae | ||
|
|
ecdfe9ecc0 | ||
|
|
d19cb08e9c | ||
|
|
f45320e5ed | ||
|
|
93ded34de9 | ||
|
|
dd13e2eaf7 | ||
|
|
1405c6f260 | ||
|
|
0dab31f993 | ||
|
|
8070c70152 | ||
|
|
c3ebb321cf | ||
|
|
e54deb594a | ||
|
|
432d071ec8 | ||
|
|
b9c06f1f5d | ||
|
|
52cc6462a6 | ||
|
|
35c2afef67 | ||
|
|
339c86fca0 | ||
|
|
0afd3de977 | ||
|
|
e699569d46 | ||
|
|
ced852d9db | ||
|
|
a63612613e | ||
|
|
c9ec7b492a | ||
|
|
bf8ffc07ee | ||
|
|
73e1ea7f93 | ||
|
|
5979b99398 | ||
|
|
50ddb918cc | ||
|
|
6b19eb8876 | ||
|
|
47be0841fc | ||
|
|
99c7bb70fc | ||
|
|
f139bb0036 | ||
|
|
23f592ca24 | ||
|
|
fe4821d4f7 | ||
|
|
c338d4fec5 | ||
|
|
d7e6758089 | ||
|
|
0ad62636b9 | ||
|
|
f872c7dfe9 | ||
|
|
c5fdd59eb1 | ||
|
|
7132dc3ac0 | ||
|
|
956d5be959 | ||
|
|
936591d40b | ||
|
|
686e4f8ddf | ||
|
|
b61825235e | ||
|
|
8157f324a0 | ||
|
|
132b617aaa | ||
|
|
25b1f3e9ea | ||
|
|
f94c8fc26e | ||
|
|
d149f46cf6 | ||
|
|
6a24ba5d56 | ||
|
|
db8333a858 | ||
|
|
3af254d7c7 | ||
|
|
8151bb108a | ||
|
|
3b18769c2d | ||
|
|
2883cac6d4 | ||
|
|
d7ae2f0625 | ||
|
|
318f6d0986 | ||
|
|
2ca430f40c | ||
|
|
fd65060a8e | ||
|
|
cb81f819ba | ||
|
|
61c7040e4b | ||
|
|
fa10827443 | ||
|
|
bcee779e74 | ||
|
|
34315c91d7 | ||
|
|
8d3bf6c4a5 | ||
|
|
0c176b70f8 | ||
|
|
87a5854357 | ||
|
|
9c2d51d718 | ||
|
|
e618f046ea | ||
|
|
a36cb925ff | ||
|
|
9e2aea2793 | ||
|
|
ef1e2bb5ed | ||
|
|
6a457281ea | ||
|
|
41c512798d | ||
|
|
ffa0f51305 | ||
|
|
e0cec9e24a | ||
|
|
f6b359a772 | ||
|
|
648eb89c7c | ||
|
|
ba22e085b8 | ||
|
|
35373db1d3 | ||
|
|
932cfa7200 | ||
|
|
932ef933fc | ||
|
|
4f1293525c | ||
|
|
dd6bec8a0c | ||
|
|
1abca64765 | ||
|
|
dbe55d89ec | ||
|
|
dcb3ad661c | ||
|
|
1e1f6cb4a3 | ||
|
|
83d96fd71d | ||
|
|
7dc4670028 | ||
|
|
dc88e2413b | ||
|
|
b7f7c3f164 | ||
|
|
f7def38e20 | ||
|
|
cf49e1ff74 | ||
|
|
38de2d6b30 | ||
|
|
4b3de264ef | ||
|
|
4bb785c7f0 | ||
|
|
2fb904d2cb | ||
|
|
ee79347e27 | ||
|
|
3477c81d37 | ||
|
|
930789316c | ||
|
|
01a08eae58 | ||
|
|
d73c9833ab | ||
|
|
1841597405 | ||
|
|
8003e5ce43 | ||
|
|
d0023a6c92 | ||
|
|
a9293f6ce1 | ||
|
|
58c5b586a9 | ||
|
|
21d224da22 | ||
|
|
43d957c8d3 | ||
|
|
917fad510a | ||
|
|
269eef7ef3 | ||
|
|
b811f4527b | ||
|
|
67378e4535 | ||
|
|
dad9033482 | ||
|
|
32c8333564 | ||
|
|
4d074e7f9a | ||
|
|
c61b615da6 | ||
|
|
fba6cfd62c | ||
|
|
1ba5ba5ff6 | ||
|
|
31b6988f17 | ||
|
|
16076382ba | ||
|
|
666c919b70 | ||
|
|
dea5fd717d | ||
|
|
02a4b6f721 | ||
|
|
815a6c4e3b | ||
|
|
ac26024990 | ||
|
|
f67be9d3ba | ||
|
|
bb85e3ef11 | ||
|
|
edd254531d | ||
|
|
0f1ff97a60 | ||
|
|
24e439f017 | ||
|
|
0a01fd58eb | ||
|
|
f25195b2c1 | ||
|
|
29674b02e6 | ||
|
|
572ea3febe | ||
|
|
f8334cf9d2 | ||
|
|
0ffec66bea | ||
|
|
becb386d10 | ||
|
|
0b9524eb26 | ||
|
|
ff5cd0128a | ||
|
|
b9225cd9b6 | ||
|
|
8f0ed3c5b3 | ||
|
|
12e3a768dd | ||
|
|
a04ab5b0e8 | ||
|
|
845f08b060 | ||
|
|
31c849cc2d | ||
|
|
977757d346 | ||
|
|
f2c549158d | ||
|
|
a36764f1b0 | ||
|
|
033bc25d8f | ||
|
|
31bd253a73 | ||
|
|
2f4977be63 | ||
|
|
35f931a708 | ||
|
|
3e23d8d5d5 | ||
|
|
004de0a655 | ||
|
|
47a1af4be1 | ||
|
|
7b17c4caa8 | ||
|
|
fa29885b3f | ||
|
|
beece69f9e | ||
|
|
600ff1d62b | ||
|
|
094dc192a9 | ||
|
|
939bf30138 | ||
|
|
d203ce188a | ||
|
|
268fed19f9 | ||
|
|
04bf414de4 | ||
|
|
28e1c65631 | ||
|
|
e936ac4ce1 | ||
|
|
13201e7a9e | ||
|
|
9740b28764 | ||
|
|
1fa94efa02 | ||
|
|
44172e1a8e | ||
|
|
4ab0d24d24 | ||
|
|
049e66770a | ||
|
|
bf12687f63 | ||
|
|
10389d9029 | ||
|
|
40996f9d48 | ||
|
|
3d284461f3 | ||
|
|
6642641c11 | ||
|
|
3e637a482e | ||
|
|
6374248132 | ||
|
|
b9661d74ee | ||
|
|
0a5b956cb9 | ||
|
|
be88fd941d | ||
|
|
48af9e7c1c | ||
|
|
71684350e9 | ||
|
|
9a1924b7c6 | ||
|
|
fc20697d81 | ||
|
|
e7dda207fa | ||
|
|
7fd97fa194 | ||
|
|
ccbadfbd69 | ||
|
|
e2f2d6c5d8 | ||
|
|
8b64e95845 | ||
|
|
a7e528cdbb | ||
|
|
e23291359f | ||
|
|
2cd557c000 | ||
|
|
a42ff6523f | ||
|
|
62eaf3280d | ||
|
|
f25fa4ba1c | ||
|
|
7d498d4b75 | ||
|
|
ec0fb98b72 | ||
|
|
9689be445c | ||
|
|
adba3ce0b5 | ||
|
|
ee43cecaaf | ||
|
|
56fb33999e | ||
|
|
a421630a2d | ||
|
|
7e95eea337 | ||
|
|
eec76a7ec3 | ||
|
|
4184843e1d | ||
|
|
84bb0d6bec | ||
|
|
54f769c6db | ||
|
|
b7eed64074 | ||
|
|
0134553cbb | ||
|
|
f0b42c77c2 | ||
|
|
40b0f937bd | ||
|
|
48c2c5af65 | ||
|
|
4384ba2f47 | ||
|
|
11c2e08353 | ||
|
|
dc55bd1fb9 | ||
|
|
f7c04bc35f | ||
|
|
ca801e321e | ||
|
|
a3359e8c77 | ||
|
|
ab0ad2b26a | ||
|
|
4900b21047 | ||
|
|
0ee852aa84 | ||
|
|
2de4362f8e | ||
|
|
400913aaac | ||
|
|
f0d736cd1d | ||
|
|
54d1758eee | ||
|
|
36bb98e2af | ||
|
|
c3015493fc | ||
|
|
24c036836e | ||
|
|
46be435e1a | ||
|
|
c2847eff5e | ||
|
|
d17b696fc5 | ||
|
|
11a047c3a6 | ||
|
|
e3ed797983 | ||
|
|
c5e41e65aa | ||
|
|
7e343d25e6 | ||
|
|
a6a9ddbe46 | ||
|
|
8d501660a4 | ||
|
|
bb877069d5 | ||
|
|
48d65cebf9 | ||
|
|
9e7e8df387 | ||
|
|
8a44970965 | ||
|
|
e551541d57 | ||
|
|
a091e8d2bf | ||
|
|
4d1e8b48e6 | ||
|
|
13307cf7bd | ||
|
|
03548d17ff | ||
|
|
c3de4fcbab | ||
|
|
82495fa724 | ||
|
|
741262d031 | ||
|
|
5a60961470 | ||
|
|
3462b60e47 | ||
|
|
239d4ce4ec | ||
|
|
fc5cea11b5 | ||
|
|
c54d721694 | ||
|
|
88d16d5392 | ||
|
|
f1b22415c3 | ||
|
|
b4fae4b800 | ||
|
|
b172177142 | ||
|
|
3fc11c5381 | ||
|
|
13cf896fe2 | ||
|
|
84ff915a56 | ||
|
|
74aedbccfe | ||
|
|
6e49298aea | ||
|
|
c1ba290e41 | ||
|
|
60e8974580 | ||
|
|
033eeda50a | ||
|
|
e7e34f3e16 | ||
|
|
7e1fcebdd8 | ||
|
|
fd4ee2123d | ||
|
|
62caa840ef | ||
|
|
565e890973 | ||
|
|
84c4642ced | ||
|
|
699164eba5 | ||
|
|
d86928f1b4 | ||
|
|
06fc077f1b | ||
|
|
97ba31f345 | ||
|
|
a8795defc1 | ||
|
|
1b35cf7a39 | ||
|
|
ed62ed516f | ||
|
|
b4f1c6f7f8 | ||
|
|
14e4ca70b4 | ||
|
|
12fa94539b | ||
|
|
e40a2459c0 | ||
|
|
cffa6dc494 | ||
|
|
d818799418 | ||
|
|
808d18e7cd | ||
|
|
d40c4ac0ed | ||
|
|
caaad9205c | ||
|
|
8a47c4bb41 | ||
|
|
f7b3b9c4eb | ||
|
|
099430c764 | ||
|
|
deca3ebd64 | ||
|
|
79dd3d02e3 | ||
|
|
f49299fa91 | ||
|
|
250f408228 | ||
|
|
26f8b75bed | ||
|
|
f541c2f7c1 | ||
|
|
997ffc02a3 | ||
|
|
fa6335d6ac | ||
|
|
57694bdc14 | ||
|
|
eed243d43b | ||
|
|
37e21f6505 | ||
|
|
d25e14147c | ||
|
|
1d4bce7309 | ||
|
|
8c0c56930e | ||
|
|
2e9255344e | ||
|
|
346a7cabe1 | ||
|
|
4a430b2701 | ||
|
|
bb53e88a4e | ||
|
|
cfd04a5b39 | ||
|
|
e0f2d5e202 | ||
|
|
3035cbc5de | ||
|
|
7c271be310 | ||
|
|
ba373ebc6b | ||
|
|
2450d88a29 | ||
|
|
376a59c182 | ||
|
|
d584ca57f1 | ||
|
|
c50662849b | ||
|
|
82da690139 | ||
|
|
b11a9b0eac | ||
|
|
d7653474c3 | ||
|
|
ce2fd86ca3 | ||
|
|
c9c496c63f | ||
|
|
b1c9f8ca6e | ||
|
|
e84bd73a39 | ||
|
|
c69d1b02fb | ||
|
|
b590d33b88 | ||
|
|
c1e7a3eb7e | ||
|
|
fd743a9d5e | ||
|
|
4c40fd5186 | ||
|
|
2cb470b99e | ||
|
|
b6539f8795 | ||
|
|
6d7de4a8da | ||
|
|
41999f36f0 | ||
|
|
fa2a8da17b | ||
|
|
214684eae7 | ||
|
|
b3a92af04d | ||
|
|
210a314c81 | ||
|
|
46cba52bcb | ||
|
|
bf14ec05f9 | ||
|
|
6f88a96c3e | ||
|
|
e12c9c47a7 | ||
|
|
83085052f8 | ||
|
|
eda618d845 | ||
|
|
8d4280f4ca | ||
|
|
b57816bba4 | ||
|
|
b6db194a22 | ||
|
|
8f708164cd | ||
|
|
ff09ae0a47 | ||
|
|
d21d752029 | ||
|
|
2ea077a7cd | ||
|
|
0d67c55e12 | ||
|
|
8837dca039 | ||
|
|
c9ec846a3c | ||
|
|
786829f317 | ||
|
|
10891af33b | ||
|
|
3f091175e2 | ||
|
|
0e5d7c918b | ||
|
|
fd2358a4b8 | ||
|
|
dd36b1859c | ||
|
|
8c9a8a484f | ||
|
|
451ed1ae3a | ||
|
|
4ec30df2dc | ||
|
|
163b7ff2d8 | ||
|
|
6e136e98b3 | ||
|
|
100eef2cb8 | ||
|
|
1d8cf4b675 | ||
|
|
5a01517097 | ||
|
|
ca54d4e0a0 | ||
|
|
2bcc4a2254 | ||
|
|
afe5ff3e70 | ||
|
|
4d8b021284 | ||
|
|
281dd3d378 | ||
|
|
7efb48dd2a | ||
|
|
d7b68bcafb | ||
|
|
04d1dffe53 | ||
|
|
db492c3787 | ||
|
|
d04b04507a | ||
|
|
6c87d3614d | ||
|
|
dd6d409ebb | ||
|
|
9f75c2b601 | ||
|
|
9df87a0e3d | ||
|
|
628dcf1539 | ||
|
|
38b42dad62 | ||
|
|
90359d61d9 | ||
|
|
57c3b9c29e | ||
|
|
b25f2e8c54 | ||
|
|
5be40fa99c | ||
|
|
bc909dd3aa | ||
|
|
3110c20596 |
6
.env.sample
Normal file
6
.env.sample
Normal file
@@ -0,0 +1,6 @@
|
||||
DB_PORT=3306
|
||||
DB_USERNAME=std_notes_user
|
||||
DB_PASSWORD=changeme123
|
||||
DB_DATABASE=standard_notes_db
|
||||
|
||||
REDIS_PORT=6379
|
||||
91
.github/dependabot.yml
vendored
Normal file
91
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/analytics"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/api-gateway"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/auth"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/common"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/domain-events"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/domain-events-infra"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/event-store"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/files"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/predicates"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/scheduler"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/security"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/settings"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/sncrypto-node"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/syncing-server"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/time"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
161
.github/workflows/api-gateway.release.yml
vendored
Normal file
161
.github/workflows/api-gateway.release.yml
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
name: Api Gateway
|
||||
|
||||
concurrency:
|
||||
group: api_gateway
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/api-gateway*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint:api-gateway
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Publish Docker image for E2E testing
|
||||
run: |
|
||||
yarn docker build @standardnotes/api-gateway -t standardnotes/api-gateway:${{ github.sha }}
|
||||
docker push standardnotes/api-gateway:${{ github.sha }}
|
||||
|
||||
- name: Run E2E test suite
|
||||
uses: convictional/trigger-workflow-and-wait@v1.6.3
|
||||
with:
|
||||
owner: standardnotes
|
||||
repo: e2e
|
||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
workflow_file_name: testing-with-stable-client.yml
|
||||
wait_interval: 30
|
||||
client_payload: '{"api_gateway_image_tag": "${{ github.sha }}"}'
|
||||
propagate_failure: true
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
|
||||
publish-aws-ecr:
|
||||
needs: test
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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: Build locally
|
||||
run: yarn build
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
- name: Login to Amazon ECR
|
||||
id: login-ecr
|
||||
uses: aws-actions/amazon-ecr-login@v1
|
||||
- name: Build, tag, and push image to Amazon ECR
|
||||
id: build-image
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
||||
ECR_REPOSITORY: api-gateway
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
run: |
|
||||
yarn docker build @standardnotes/api-gateway -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:latest
|
||||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
|
||||
|
||||
publish-docker-hub:
|
||||
needs: test
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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: Build locally
|
||||
run: yarn build
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Publish Docker image as stable
|
||||
run: |
|
||||
yarn docker build @standardnotes/api-gateway -t standardnotes/api-gateway:latest
|
||||
docker push standardnotes/api-gateway:latest
|
||||
|
||||
deploy-web:
|
||||
needs: publish-aws-ecr
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
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
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition api-gateway-prod --query taskDefinition > task-definition.json
|
||||
- name: Fill in the new version in the Amazon ECS task definition
|
||||
run: |
|
||||
jq '(.containerDefinitions[] | select(.name=="api-gateway-prod") | .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-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: api-gateway-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/api-gateway:${{ github.sha }}
|
||||
- name: 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: api-gateway-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
newrelic:
|
||||
needs: deploy-web
|
||||
|
||||
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_API_GATEWAY_WEB_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
@@ -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,11 +16,45 @@ 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 lint:auth
|
||||
- run: yarn test:auth
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint:auth
|
||||
|
||||
- name: Test
|
||||
run: yarn test:auth
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Publish Docker image for E2E testing
|
||||
run: |
|
||||
yarn docker build @standardnotes/auth-server -t standardnotes/auth:${{ github.sha }}
|
||||
docker push standardnotes/auth:${{ github.sha }}
|
||||
|
||||
- name: Run E2E test suite
|
||||
uses: convictional/trigger-workflow-and-wait@v1.6.3
|
||||
with:
|
||||
owner: standardnotes
|
||||
repo: e2e
|
||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
workflow_file_name: testing-with-stable-client.yml
|
||||
wait_interval: 30
|
||||
client_payload: '{"auth_image_tag": "${{ github.sha }}"}'
|
||||
propagate_failure: true
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
|
||||
publish-aws-ecr:
|
||||
needs: test
|
||||
@@ -30,8 +63,13 @@ jobs:
|
||||
|
||||
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: Build locally
|
||||
run: yarn build:auth
|
||||
run: yarn build
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
@@ -50,8 +88,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
|
||||
@@ -60,19 +98,22 @@ jobs:
|
||||
|
||||
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: Build locally
|
||||
run: yarn build:auth
|
||||
run: yarn build
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build, tag, and push image to Docker Hub
|
||||
- name: Publish Docker image as stable
|
||||
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
|
||||
yarn docker build @standardnotes/auth-server -t standardnotes/auth:latest
|
||||
docker push standardnotes/auth:latest
|
||||
|
||||
deploy-web:
|
||||
needs: publish-aws-ecr
|
||||
@@ -88,23 +129,23 @@ jobs:
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition auth-dev --query taskDefinition > task-definition.json
|
||||
aws ecs describe-task-definition --task-definition auth-prod --query taskDefinition > task-definition.json
|
||||
- name: 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
|
||||
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: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: auth-dev
|
||||
container-name: auth-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }}
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def.outputs.task-definition }}
|
||||
service: auth-dev
|
||||
cluster: dev
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: auth-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
deploy-worker:
|
||||
@@ -121,23 +162,23 @@ jobs:
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition auth-worker-dev --query taskDefinition > task-definition.json
|
||||
aws ecs describe-task-definition --task-definition auth-worker-prod --query taskDefinition > task-definition.json
|
||||
- name: 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
|
||||
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: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: auth-worker-dev
|
||||
container-name: auth-worker-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/auth:${{ github.sha }}
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def.outputs.task-definition }}
|
||||
service: auth-worker-dev
|
||||
cluster: dev
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: auth-worker-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
newrelic:
|
||||
@@ -150,7 +191,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,19 +200,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 }}"
|
||||
|
||||
notify_discord:
|
||||
needs: [ deploy-web, deploy-worker ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Run Discord Webhook
|
||||
uses: johnnyhuy/actions-discord-git-webhook@main
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
|
||||
136
.github/workflows/event-store.release.yml
vendored
Normal file
136
.github/workflows/event-store.release.yml
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
name: Event Store
|
||||
|
||||
concurrency:
|
||||
group: event-store
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*standardnotes/event-store*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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'
|
||||
- run: yarn build
|
||||
- run: yarn lint:event-store
|
||||
- run: yarn test:event-store
|
||||
|
||||
publish-aws-ecr:
|
||||
needs: test
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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: Build locally
|
||||
run: yarn build
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-1
|
||||
- name: Login to Amazon ECR
|
||||
id: login-ecr
|
||||
uses: aws-actions/amazon-ecr-login@v1
|
||||
- name: Build, tag, and push image to Amazon ECR
|
||||
id: build-image
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
|
||||
ECR_REPOSITORY: event-store
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
run: |
|
||||
yarn docker build @standardnotes/event-store -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:latest
|
||||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
|
||||
|
||||
publish-docker-hub:
|
||||
needs: test
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
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: Build locally
|
||||
run: yarn build
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Build, tag, and push image to Docker Hub
|
||||
run: |
|
||||
yarn docker build @standardnotes/event-store -t standardnotes/event-store:${{ github.sha }}
|
||||
docker push standardnotes/event-store:${{ github.sha }}
|
||||
docker tag standardnotes/event-store:${{ github.sha }} standardnotes/event-store:latest
|
||||
docker push standardnotes/event-store:latest
|
||||
|
||||
deploy-worker:
|
||||
needs: publish-aws-ecr
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
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
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition event-store-prod --query taskDefinition > task-definition.json
|
||||
- name: Fill in the new version in the Amazon ECS task definition
|
||||
run: |
|
||||
jq '(.containerDefinitions[] | select(.name=="event-store-prod") | .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-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: event-store-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/event-store:${{ github.sha }}
|
||||
- name: 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: event-store-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
newrelic:
|
||||
needs: [ deploy-worker ]
|
||||
|
||||
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 }}"
|
||||
@@ -1,14 +1,13 @@
|
||||
name: Files Server Dev
|
||||
name: Files Server
|
||||
|
||||
concurrency:
|
||||
group: files_dev_environment
|
||||
group: files
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '@standardnotes/files-server@[0-9]*.[0-9]*.[0-9]*-alpha.[0-9]*'
|
||||
- '@standardnotes/files-server@[0-9]*.[0-9]*.[0-9]*-beta.[0-9]*'
|
||||
- '*standardnotes/files-server*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -17,11 +16,45 @@ 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 lint:files
|
||||
- run: yarn test:files
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint:files
|
||||
|
||||
- name: Test
|
||||
run: yarn test:files
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Publish Docker image for E2E testing
|
||||
run: |
|
||||
yarn docker build @standardnotes/files-server -t standardnotes/files:${{ github.sha }}
|
||||
docker push standardnotes/files:${{ github.sha }}
|
||||
|
||||
- name: Run E2E test suite
|
||||
uses: convictional/trigger-workflow-and-wait@v1.6.3
|
||||
with:
|
||||
owner: standardnotes
|
||||
repo: e2e
|
||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
workflow_file_name: testing-with-stable-client.yml
|
||||
wait_interval: 30
|
||||
client_payload: '{"files_image_tag": "${{ github.sha }}"}'
|
||||
propagate_failure: true
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
|
||||
publish-aws-ecr:
|
||||
needs: test
|
||||
@@ -29,8 +62,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cp .env.sample .env
|
||||
- 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: Build locally
|
||||
run: yarn build
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
@@ -47,10 +86,10 @@ jobs:
|
||||
ECR_REPOSITORY: files
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
run: |
|
||||
yarn docker build @standardnotes/files -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||
yarn docker build @standardnotes/files-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
|
||||
@@ -58,15 +97,23 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cp .env.sample .env
|
||||
- name: Publish to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
- 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: Build locally
|
||||
run: yarn build
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
name: standardnotes/files
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
tags: "dev,${{ github.sha }}"
|
||||
- name: Build, tag, and push image to Docker Hub
|
||||
run: |
|
||||
yarn docker build @standardnotes/files-server -t standardnotes/files:latest
|
||||
docker push standardnotes/files:latest
|
||||
|
||||
deploy-web:
|
||||
needs: publish-aws-ecr
|
||||
@@ -82,23 +129,23 @@ jobs:
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition files-dev --query taskDefinition > task-definition.json
|
||||
aws ecs describe-task-definition --task-definition files-prod --query taskDefinition > task-definition.json
|
||||
- name: Fill in the new version in the Amazon ECS task definition
|
||||
run: |
|
||||
jq '(.containerDefinitions[] | select(.name=="files-dev") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
|
||||
jq '(.containerDefinitions[] | select(.name=="files-prod") | .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
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: files-dev
|
||||
container-name: files-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/files:${{ github.sha }}
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def.outputs.task-definition }}
|
||||
service: files-dev
|
||||
cluster: dev
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: files-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
deploy-worker:
|
||||
@@ -115,23 +162,23 @@ jobs:
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition files-worker-dev --query taskDefinition > task-definition.json
|
||||
aws ecs describe-task-definition --task-definition files-worker-prod --query taskDefinition > task-definition.json
|
||||
- name: Fill in the new version in the Amazon ECS task definition
|
||||
run: |
|
||||
jq '(.containerDefinitions[] | select(.name=="files-worker-dev") | .environment[] | select(.name=="VERSION")).value = "${{ github.sha }}"' task-definition.json > tmp.json && mv tmp.json task-definition.json
|
||||
jq '(.containerDefinitions[] | select(.name=="files-worker-prod") | .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
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: files-worker-dev
|
||||
container-name: files-worker-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/files:${{ github.sha }}
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def.outputs.task-definition }}
|
||||
service: files-worker-dev
|
||||
cluster: dev
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: files-worker-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
newrelic:
|
||||
@@ -144,7 +191,7 @@ jobs:
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_FILES_WEB_DEV }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_FILES_WEB_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
@@ -153,18 +200,7 @@ jobs:
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_FILES_WORKER_DEV }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_FILES_WORKER_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
|
||||
notify_discord:
|
||||
needs: [ deploy-web, deploy-worker ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Run Discord Webhook
|
||||
uses: johnnyhuy/actions-discord-git-webhook@main
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
24
.github/workflows/pr.yml
vendored
Normal file
24
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
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: ESLint
|
||||
run: yarn lint
|
||||
- name: Build
|
||||
run: yarn build
|
||||
- name: Test
|
||||
run: yarn test
|
||||
@@ -1,11 +1,11 @@
|
||||
name: Version Bump
|
||||
name: Publish Packages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop, main ]
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
bump:
|
||||
release_and_publish:
|
||||
if: contains(github.event.head_commit.message, 'chore(release)') == false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -28,17 +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 Prod Version
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
run: yarn release:prod
|
||||
- name: Bump version
|
||||
run: yarn release
|
||||
|
||||
- name: Publish
|
||||
run: yarn publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_TOKEN }}
|
||||
|
||||
- name: Bump Beta Version
|
||||
if: ${{ github.ref == 'refs/heads/develop' }}
|
||||
run: yarn release:beta
|
||||
@@ -1,14 +1,13 @@
|
||||
name: Scheduler Server Dev
|
||||
name: Scheduler Server
|
||||
|
||||
concurrency:
|
||||
group: scheduler_dev_environment
|
||||
group: scheduler
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '@standardnotes/scheduler-server@[0-9]*.[0-9]*.[0-9]*-alpha.[0-9]*'
|
||||
- '@standardnotes/scheduler-server@[0-9]*.[0-9]*.[0-9]*-beta.[0-9]*'
|
||||
- '*standardnotes/scheduler-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:scheduler
|
||||
- run: yarn test:scheduler
|
||||
|
||||
@@ -30,8 +32,13 @@ jobs:
|
||||
|
||||
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: Build locally
|
||||
run: yarn build:scheduler
|
||||
run: yarn build
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
@@ -50,8 +57,8 @@ jobs:
|
||||
run: |
|
||||
yarn docker build @standardnotes/scheduler-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
|
||||
@@ -60,8 +67,13 @@ jobs:
|
||||
|
||||
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: Build locally
|
||||
run: yarn build:scheduler
|
||||
run: yarn build
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
@@ -71,8 +83,8 @@ jobs:
|
||||
run: |
|
||||
yarn docker build @standardnotes/scheduler-server -t standardnotes/scheduler:${{ github.sha }}
|
||||
docker push standardnotes/scheduler:${{ github.sha }}
|
||||
docker tag standardnotes/scheduler:${{ github.sha }} standardnotes/scheduler:dev
|
||||
docker push standardnotes/scheduler:dev
|
||||
docker tag standardnotes/scheduler:${{ github.sha }} standardnotes/scheduler:latest
|
||||
docker push standardnotes/scheduler:latest
|
||||
|
||||
deploy-worker:
|
||||
needs: publish-aws-ecr
|
||||
@@ -88,23 +100,23 @@ jobs:
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition scheduler-worker-dev --query taskDefinition > task-definition.json
|
||||
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
|
||||
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
|
||||
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: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: scheduler-worker-dev
|
||||
container-name: scheduler-worker-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/scheduler-worker:${{ github.sha }}
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def.outputs.task-definition }}
|
||||
service: scheduler-worker-dev
|
||||
cluster: dev
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: scheduler-worker-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
newrelic:
|
||||
@@ -118,19 +130,7 @@ jobs:
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SCHEDULER_WORKER_DEV }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SCHEDULER_WORKER_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
|
||||
notify_discord:
|
||||
needs: [ deploy-worker ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Run Discord Webhook
|
||||
uses: johnnyhuy/actions-discord-git-webhook@main
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
|
||||
48
.github/workflows/snjs.upgrade.event.yml
vendored
Normal file
48
.github/workflows/snjs.upgrade.event.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
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 }}
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
- 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>
|
||||
@@ -1,14 +1,13 @@
|
||||
name: Syncing Server Dev
|
||||
name: Syncing Server
|
||||
|
||||
concurrency:
|
||||
group: syncing_server_dev_environment
|
||||
group: syncing_server
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '@standardnotes/syncing-server@[0-9]*.[0-9]*.[0-9]*-alpha.[0-9]*'
|
||||
- '@standardnotes/syncing-server@[0-9]*.[0-9]*.[0-9]*-beta.[0-9]*'
|
||||
- '*standardnotes/syncing-server*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -17,11 +16,45 @@ 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 lint:syncing-server
|
||||
- run: yarn test:syncing-server
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint:syncing-server
|
||||
|
||||
- name: Test
|
||||
run: yarn test:syncing-server
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Publish Docker image for E2E testing
|
||||
run: |
|
||||
yarn docker build @standardnotes/syncing-server -t standardnotes/syncing-server-js:${{ github.sha }}
|
||||
docker push standardnotes/syncing-server-js:${{ github.sha }}
|
||||
|
||||
- name: Run E2E test suite
|
||||
uses: convictional/trigger-workflow-and-wait@v1.6.3
|
||||
with:
|
||||
owner: standardnotes
|
||||
repo: e2e
|
||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
workflow_file_name: testing-with-stable-client.yml
|
||||
wait_interval: 30
|
||||
client_payload: '{"syncing_server_js_image_tag": "${{ github.sha }}"}'
|
||||
propagate_failure: true
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
|
||||
publish-aws-ecr:
|
||||
needs: test
|
||||
@@ -29,8 +62,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cp .env.sample .env
|
||||
- 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: Build locally
|
||||
run: yarn build
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
@@ -49,8 +88,8 @@ jobs:
|
||||
run: |
|
||||
yarn docker build @standardnotes/syncing-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
|
||||
@@ -58,15 +97,23 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: cp .env.sample .env
|
||||
- name: Publish to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
- 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: Build locally
|
||||
run: yarn build
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
name: standardnotes/syncing-server-js
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
tags: "dev,${{ github.sha }}"
|
||||
- name: Build, tag, and push image to Docker Hub
|
||||
run: |
|
||||
yarn docker build @standardnotes/syncing-server -t standardnotes/syncing-server-js:latest
|
||||
docker push standardnotes/syncing-server-js:latest
|
||||
|
||||
deploy-web:
|
||||
needs: publish-aws-ecr
|
||||
@@ -82,23 +129,23 @@ jobs:
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition syncing-server-js-dev --query taskDefinition > task-definition.json
|
||||
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
|
||||
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
|
||||
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: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: syncing-server-js-dev
|
||||
container-name: syncing-server-js-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/syncing-server-js:${{ github.sha }}
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def.outputs.task-definition }}
|
||||
service: syncing-server-js-dev
|
||||
cluster: dev
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: syncing-server-js-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
deploy-worker:
|
||||
@@ -115,23 +162,23 @@ jobs:
|
||||
aws-region: us-east-1
|
||||
- name: Download task definition
|
||||
run: |
|
||||
aws ecs describe-task-definition --task-definition syncing-server-js-worker-dev --query taskDefinition > task-definition.json
|
||||
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
|
||||
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
|
||||
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: Fill in the new image ID in the Amazon ECS task definition
|
||||
id: task-def
|
||||
id: task-def-prod
|
||||
uses: aws-actions/amazon-ecs-render-task-definition@v1
|
||||
with:
|
||||
task-definition: task-definition.json
|
||||
container-name: syncing-server-js-worker-dev
|
||||
container-name: syncing-server-js-worker-prod
|
||||
image: ${{ secrets.AWS_ECR_REGISTRY }}/syncing-server-js:${{ github.sha }}
|
||||
- name: Deploy Amazon ECS task definition
|
||||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
|
||||
with:
|
||||
task-definition: ${{ steps.task-def.outputs.task-definition }}
|
||||
service: syncing-server-js-worker-dev
|
||||
cluster: dev
|
||||
task-definition: ${{ steps.task-def-prod.outputs.task-definition }}
|
||||
service: syncing-server-js-worker-prod
|
||||
cluster: prod
|
||||
wait-for-service-stability: true
|
||||
|
||||
newrelic:
|
||||
@@ -144,7 +191,7 @@ jobs:
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SYNCING_SERVER_WEB_DEV }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SYNCING_SERVER_WEB_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
@@ -153,18 +200,7 @@ jobs:
|
||||
with:
|
||||
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
|
||||
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SYNCING_SERVER_WORKER_DEV }}
|
||||
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SYNCING_SERVER_WORKER_PROD }}
|
||||
revision: "${{ github.sha }}"
|
||||
description: "Automated Deployment via Github Actions"
|
||||
user: "${{ github.actor }}"
|
||||
|
||||
notify_discord:
|
||||
needs: [ deploy-web, deploy-worker ]
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Run Discord Webhook
|
||||
uses: johnnyhuy/actions-discord-git-webhook@main
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -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
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-core-npm-7.18.6-52b1065703-711459ebf7.zip
vendored
Normal file
BIN
.yarn/cache/@babel-core-npm-7.18.6-52b1065703-711459ebf7.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-generator-npm-7.18.7-14509012bd-aad4b68731.zip
vendored
Normal file
BIN
.yarn/cache/@babel-generator-npm-7.18.7-14509012bd-aad4b68731.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-compilation-targets-npm-7.18.6-db5c17ef96-f09ddaddc8.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-compilation-targets-npm-7.18.6-db5c17ef96-f09ddaddc8.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-function-name-npm-7.18.6-d041b167ad-bf84c2e069.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-function-name-npm-7.18.6-d041b167ad-bf84c2e069.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-module-imports-npm-7.18.6-1031faa864-f393f8a3b3.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-module-imports-npm-7.18.6-1031faa864-f393f8a3b3.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-module-transforms-npm-7.18.6-91962d1cd6-75d90be9ec.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-module-transforms-npm-7.18.6-91962d1cd6-75d90be9ec.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-plugin-utils-npm-7.18.6-12ee942c4e-3dbfceb6c1.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-plugin-utils-npm-7.18.6-12ee942c4e-3dbfceb6c1.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-helper-split-export-declaration-npm-7.18.6-53ebf8ad4c-c6d3dede53.zip
vendored
Normal file
BIN
.yarn/cache/@babel-helper-split-export-declaration-npm-7.18.6-53ebf8ad4c-c6d3dede53.zip
vendored
Normal file
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
.yarn/cache/@babel-parser-npm-7.18.6-f3f50dbfca-533ffc2666.zip
vendored
Normal file
BIN
.yarn/cache/@babel-parser-npm-7.18.6-f3f50dbfca-533ffc2666.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-traverse-npm-7.18.6-ab4298b064-5427a9db63.zip
vendored
Normal file
BIN
.yarn/cache/@babel-traverse-npm-7.18.6-ab4298b064-5427a9db63.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@babel-types-npm-7.18.7-ce70018628-3114ce161c.zip
vendored
Normal file
BIN
.yarn/cache/@babel-types-npm-7.18.7-ce70018628-3114ce161c.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-config-conventional-npm-17.0.3-58ee159448-1cd30d827c.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-config-conventional-npm-17.0.3-58ee159448-1cd30d827c.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-config-validator-npm-17.0.3-721ee560ed-bc543193bb.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-config-validator-npm-17.0.3-721ee560ed-bc543193bb.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@commitlint-resolve-extends-npm-17.0.3-70f5e27c89-384fc59a5a.zip
vendored
Normal file
BIN
.yarn/cache/@commitlint-resolve-extends-npm-17.0.3-70f5e27c89-384fc59a5a.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@ioredis-commands-npm-1.2.0-47541de88b-9b20225ba3.zip
vendored
Normal file
BIN
.yarn/cache/@ioredis-commands-npm-1.2.0-47541de88b-9b20225ba3.zip
vendored
Normal file
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.
BIN
.yarn/cache/@jridgewell-gen-mapping-npm-0.3.2-c64eeb4a4e-1832707a1c.zip
vendored
Normal file
BIN
.yarn/cache/@jridgewell-gen-mapping-npm-0.3.2-c64eeb4a4e-1832707a1c.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@jridgewell-resolve-uri-npm-3.1.0-6ff2351e61-b5ceaaf9a1.zip
vendored
Normal file
BIN
.yarn/cache/@jridgewell-resolve-uri-npm-3.1.0-6ff2351e61-b5ceaaf9a1.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@jridgewell-set-array-npm-1.1.2-45b82d7fb6-69a84d5980.zip
vendored
Normal file
BIN
.yarn/cache/@jridgewell-set-array-npm-1.1.2-45b82d7fb6-69a84d5980.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@jridgewell-trace-mapping-npm-0.3.14-c78fcccfdf-b9537b9630.zip
vendored
Normal file
BIN
.yarn/cache/@jridgewell-trace-mapping-npm-0.3.14-c78fcccfdf-b9537b9630.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@lerna-lite-init-npm-1.6.0-51ea51e753-3b713405d4.zip
vendored
Normal file
BIN
.yarn/cache/@lerna-lite-init-npm-1.6.0-51ea51e753-3b713405d4.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@lerna-lite-list-npm-1.6.0-63fd3896ac-f9ac8c6247.zip
vendored
Normal file
BIN
.yarn/cache/@lerna-lite-list-npm-1.6.0-63fd3896ac-f9ac8c6247.zip
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@lerna-lite-listable-npm-1.6.0-9cd0de0c10-b5b3dadcb8.zip
vendored
Normal file
BIN
.yarn/cache/@lerna-lite-listable-npm-1.6.0-9cd0de0c10-b5b3dadcb8.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@lerna-lite-publish-npm-1.6.0-ae8f957c4c-ac11999601.zip
vendored
Normal file
BIN
.yarn/cache/@lerna-lite-publish-npm-1.6.0-ae8f957c4c-ac11999601.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@lerna-lite-run-npm-1.6.0-d85881ff48-dd9173801b.zip
vendored
Normal file
BIN
.yarn/cache/@lerna-lite-run-npm-1.6.0-d85881ff48-dd9173801b.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@lerna-lite-version-npm-1.6.0-c04d55cf79-7212389903.zip
vendored
Normal file
BIN
.yarn/cache/@lerna-lite-version-npm-1.6.0-c04d55cf79-7212389903.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@newrelic-koa-npm-7.0.0-903c251b9f-13fb2bf0df.zip
vendored
Normal file
BIN
.yarn/cache/@newrelic-koa-npm-7.0.0-903c251b9f-13fb2bf0df.zip
vendored
Normal file
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
Reference in New Issue
Block a user