Compare commits

...

208 Commits

Author SHA1 Message Date
standardci
7480fb089b chore(release): publish new version
- @standardnotes/analytics@2.6.0
 - @standardnotes/api-gateway@1.37.4
 - @standardnotes/auth-server@1.58.0
 - @standardnotes/domain-events-infra@1.9.17
 - @standardnotes/domain-events@2.82.0
 - @standardnotes/event-store@1.6.12
 - @standardnotes/files-server@1.8.12
 - @standardnotes/scheduler-server@1.13.13
 - @standardnotes/syncing-server@1.11.4
 - @standardnotes/websockets-server@1.4.12
 - @standardnotes/workspace-server@1.17.12
2022-11-09 10:20:29 +00:00
Karol Sójko
0f65c051ab feat(analytics): add saving revenue modifications upon subscription refunded 2022-11-09 11:17:27 +01:00
standardci
7b62c7a967 chore(release): publish new version
- @standardnotes/analytics@2.5.0
 - @standardnotes/api-gateway@1.37.3
 - @standardnotes/auth-server@1.57.0
 - @standardnotes/domain-events-infra@1.9.16
 - @standardnotes/domain-events@2.81.0
 - @standardnotes/event-store@1.6.11
 - @standardnotes/files-server@1.8.11
 - @standardnotes/scheduler-server@1.13.12
 - @standardnotes/syncing-server@1.11.3
 - @standardnotes/websockets-server@1.4.11
 - @standardnotes/workspace-server@1.17.11
2022-11-09 10:12:01 +00:00
Karol Sójko
5c3db2cb29 feat(analytics): add saving revenue modifications upon subscription expired 2022-11-09 11:09:49 +01:00
standardci
7008cbd363 chore(release): publish new version
- @standardnotes/analytics@2.4.0
 - @standardnotes/api-gateway@1.37.2
 - @standardnotes/auth-server@1.56.0
 - @standardnotes/domain-events-infra@1.9.15
 - @standardnotes/domain-events@2.80.0
 - @standardnotes/event-store@1.6.10
 - @standardnotes/files-server@1.8.10
 - @standardnotes/scheduler-server@1.13.11
 - @standardnotes/syncing-server@1.11.2
 - @standardnotes/websockets-server@1.4.10
 - @standardnotes/workspace-server@1.17.10
2022-11-09 09:59:41 +00:00
Karol Sójko
cdb7fcf831 feat(analytics): add saving revenue modifications upon subscription renewed 2022-11-09 10:57:43 +01:00
standardci
628aafdd42 chore(release): publish new version
- @standardnotes/analytics@2.3.1
2022-11-09 09:49:22 +00:00
Karol Sójko
9d3ef24ba9 fix(analytics): missing injectable annotation 2022-11-09 10:47:27 +01:00
standardci
4189f11fd7 chore(release): publish new version
- @standardnotes/analytics@2.3.0
 - @standardnotes/api-gateway@1.37.1
 - @standardnotes/auth-server@1.55.0
 - @standardnotes/domain-events-infra@1.9.14
 - @standardnotes/domain-events@2.79.0
 - @standardnotes/event-store@1.6.9
 - @standardnotes/files-server@1.8.9
 - @standardnotes/scheduler-server@1.13.10
 - @standardnotes/syncing-server@1.11.1
 - @standardnotes/websockets-server@1.4.9
 - @standardnotes/workspace-server@1.17.9
2022-11-09 07:16:01 +00:00
Karol Sójko
5ea9941519 feat(analytics): add saving revenue modifications upon subscription purchased 2022-11-09 08:14:02 +01:00
standardci
7a64494d07 chore(release): publish new version
- @standardnotes/analytics@2.2.0
2022-11-08 14:16:38 +00:00
Karol Sójko
4928685198 feat(analytics): add persistence for revenue modifications 2022-11-08 15:14:39 +01:00
Karol Sójko
0103233d4a feat(analytics): create new ddd architecture for persisting revenue modifications 2022-11-08 15:14:38 +01:00
standardci
ee7075fe60 chore(release): publish new version
- @standardnotes/auth-server@1.54.0
2022-11-07 10:59:27 +00:00
Karol Sójko
49feadd32a feat(auth): remove analytics table in favor of analytics service 2022-11-07 11:57:39 +01:00
standardci
45758bf554 chore(release): publish new version
- @standardnotes/analytics@2.1.0
 - @standardnotes/api-gateway@1.37.0
 - @standardnotes/auth-server@1.53.0
 - @standardnotes/domain-events-infra@1.9.13
 - @standardnotes/domain-events@2.78.1
 - @standardnotes/event-store@1.6.8
 - @standardnotes/files-server@1.8.8
 - @standardnotes/scheduler-server@1.13.9
 - @standardnotes/security@1.6.0
 - @standardnotes/syncing-server@1.11.0
 - @standardnotes/websockets-server@1.4.8
 - @standardnotes/workspace-server@1.17.8
2022-11-07 10:54:09 +00:00
Karol Sójko
535d566a94 fix: yarn.lock 2022-11-07 11:52:16 +01:00
Karol Sójko
ff1d5db12c feat: remove analytics scope from other services in favor of a separate service 2022-11-07 11:51:38 +01:00
standardci
77a06b2fe7 chore(release): publish new version
- @standardnotes/analytics@1.52.0
 - @standardnotes/api-gateway@1.36.14
 - @standardnotes/auth-server@1.52.1
 - @standardnotes/syncing-server@1.10.25
2022-11-07 09:20:01 +00:00
Karol Sójko
6359030030 feat(analytics): add handling subscription reactivated events 2022-11-07 10:17:49 +01:00
standardci
006f1fccec chore(release): publish new version
- @standardnotes/analytics@1.51.0
 - @standardnotes/api-gateway@1.36.13
 - @standardnotes/auth-server@1.52.0
 - @standardnotes/domain-events-infra@1.9.12
 - @standardnotes/domain-events@2.78.0
 - @standardnotes/event-store@1.6.7
 - @standardnotes/files-server@1.8.7
 - @standardnotes/scheduler-server@1.13.8
 - @standardnotes/syncing-server@1.10.24
 - @standardnotes/websockets-server@1.4.7
 - @standardnotes/workspace-server@1.17.7
2022-11-07 09:16:03 +00:00
Karol Sójko
c0f5817d47 feat(analytics): add handling subscription expired events 2022-11-07 10:14:12 +01:00
standardci
3da952fa52 chore(release): publish new version
- @standardnotes/analytics@1.50.0
 - @standardnotes/api-gateway@1.36.12
 - @standardnotes/auth-server@1.51.0
 - @standardnotes/domain-events-infra@1.9.11
 - @standardnotes/domain-events@2.77.0
 - @standardnotes/event-store@1.6.6
 - @standardnotes/files-server@1.8.6
 - @standardnotes/scheduler-server@1.13.7
 - @standardnotes/syncing-server@1.10.23
 - @standardnotes/websockets-server@1.4.6
 - @standardnotes/workspace-server@1.17.6
2022-11-07 09:03:54 +00:00
Karol Sójko
f1834d58d2 feat(analytics): add handling subscription purchased events 2022-11-07 10:02:07 +01:00
standardci
b0cde4ab75 chore(release): publish new version
- @standardnotes/analytics@1.49.0
 - @standardnotes/api-gateway@1.36.11
 - @standardnotes/auth-server@1.50.0
 - @standardnotes/domain-events-infra@1.9.10
 - @standardnotes/domain-events@2.76.0
 - @standardnotes/event-store@1.6.5
 - @standardnotes/files-server@1.8.5
 - @standardnotes/scheduler-server@1.13.6
 - @standardnotes/syncing-server@1.10.22
 - @standardnotes/websockets-server@1.4.5
 - @standardnotes/workspace-server@1.17.5
2022-11-07 06:45:26 +00:00
Karol Sójko
197c9914ca feat(analytics): add handling subscription refunded event 2022-11-07 07:43:36 +01:00
standardci
d7ef6898be chore(release): publish new version
- @standardnotes/analytics@1.48.0
 - @standardnotes/api-gateway@1.36.10
 - @standardnotes/auth-server@1.49.13
 - @standardnotes/syncing-server@1.10.21
2022-11-07 06:13:47 +00:00
Karol Sójko
2aa57f1f0d feat(analytics): add subscription renewed event handler 2022-11-07 07:11:10 +01:00
standardci
dcc0e38707 chore(release): publish new version
- @standardnotes/analytics@1.47.0
 - @standardnotes/api-gateway@1.36.9
 - @standardnotes/auth-server@1.49.12
 - @standardnotes/domain-events-infra@1.9.9
 - @standardnotes/domain-events@2.75.0
 - @standardnotes/event-store@1.6.4
 - @standardnotes/files-server@1.8.4
 - @standardnotes/scheduler-server@1.13.5
 - @standardnotes/syncing-server@1.10.20
 - @standardnotes/websockets-server@1.4.4
 - @standardnotes/workspace-server@1.17.4
2022-11-04 14:01:17 +00:00
Karol Sójko
037fb2398a feat(analytics): add subscription cancelled event handler 2022-11-04 14:59:30 +01:00
Karol Sójko
182512d07c fix(syncing-server): event specs 2022-11-04 14:59:30 +01:00
Karol Sójko
a3be4b063d fix(auth): event specs 2022-11-04 14:59:30 +01:00
standardci
a97be4c342 chore(release): publish new version
- @standardnotes/analytics@1.46.0
 - @standardnotes/api-gateway@1.36.8
 - @standardnotes/auth-server@1.49.11
 - @standardnotes/syncing-server@1.10.19
2022-11-04 13:28:39 +00:00
Karol Sójko
5902cbb621 feat(analytics): add payment success event handler 2022-11-04 14:26:47 +01:00
standardci
afc26d42ca chore(release): publish new version
- @standardnotes/analytics@1.45.0
 - @standardnotes/api-gateway@1.36.7
 - @standardnotes/auth-server@1.49.10
 - @standardnotes/syncing-server@1.10.18
2022-11-04 13:23:51 +00:00
Karol Sójko
51b12d05d4 feat: add payment failed handler and email to analytics entity 2022-11-04 14:21:34 +01:00
standardci
3fe7b4ae24 chore(release): publish new version
- @standardnotes/analytics@1.44.0
 - @standardnotes/api-gateway@1.36.6
 - @standardnotes/auth-server@1.49.9
 - @standardnotes/syncing-server@1.10.17
2022-11-04 13:02:55 +00:00
Karol Sójko
2720a7c827 feat(analytics): removing analytics entity upon account deletion 2022-11-04 14:01:10 +01:00
standardci
8d89b8ef12 chore(release): publish new version
- @standardnotes/analytics@1.43.0
 - @standardnotes/api-gateway@1.36.5
 - @standardnotes/auth-server@1.49.8
 - @standardnotes/domain-events-infra@1.9.8
 - @standardnotes/domain-events@2.74.1
 - @standardnotes/event-store@1.6.3
 - @standardnotes/files-server@1.8.3
 - @standardnotes/scheduler-server@1.13.4
 - @standardnotes/syncing-server@1.10.16
 - @standardnotes/websockets-server@1.4.3
 - @standardnotes/workspace-server@1.17.3
2022-11-04 12:55:55 +00:00
Karol Sójko
5383e0cf52 feat(analytics): add account deletion event handler 2022-11-04 13:54:07 +01:00
Karol Sójko
7b05bf8991 fix(auth): add user created at timestamp to account deletion event 2022-11-04 13:54:07 +01:00
Karol Sójko
b4c5b5a84e fix(api-gateway): removing sns bindings 2022-11-04 13:54:07 +01:00
standardci
e115523acd chore(release): publish new version
- @standardnotes/analytics@1.42.0
 - @standardnotes/api-gateway@1.36.4
 - @standardnotes/auth-server@1.49.7
 - @standardnotes/syncing-server@1.10.15
2022-11-04 10:20:35 +00:00
Karol Sójko
35611fbc07 fix(analytics): imports 2022-11-04 11:18:03 +01:00
Karol Sójko
034aa38153 feat(analytics): add user registered handler 2022-11-04 11:10:03 +01:00
standardci
795728ab31 chore(release): publish new version
- @standardnotes/analytics@1.41.0
 - @standardnotes/api-gateway@1.36.3
 - @standardnotes/auth-server@1.49.6
 - @standardnotes/syncing-server@1.10.14
2022-11-04 09:58:38 +00:00
Karol Sójko
262d295121 fix(analytics): linter setup with migrations 2022-11-04 10:56:22 +01:00
Karol Sójko
4e5ac0a47b feat(analytics): add retrieving user analytics id 2022-11-04 10:55:43 +01:00
standardci
51b8cbdab2 chore(release): publish new version
- @standardnotes/analytics@1.40.0
 - @standardnotes/api-gateway@1.36.2
 - @standardnotes/auth-server@1.49.5
 - @standardnotes/syncing-server@1.10.13
2022-11-04 09:52:57 +00:00
Karol Sójko
f315b1ac5c feat(analytics): add analytics entities 2022-11-04 10:50:38 +01:00
standardci
2feaa8d956 chore(release): publish new version
- @standardnotes/analytics@1.39.1
 - @standardnotes/api-gateway@1.36.1
 - @standardnotes/auth-server@1.49.4
 - @standardnotes/syncing-server@1.10.12
2022-11-04 09:16:15 +00:00
Karol Sójko
5329f2a2fb fix(analytics): linter setup 2022-11-04 10:14:18 +01:00
standardci
5d9d2d0c8d chore(release): publish new version
- @standardnotes/analytics@1.39.0
 - @standardnotes/api-gateway@1.36.0
 - @standardnotes/auth-server@1.49.3
 - @standardnotes/syncing-server@1.10.11
2022-11-04 09:09:58 +00:00
Karol Sójko
34e11fd5b0 feat(analytics): move the analytics report from api-gateway to analytics 2022-11-04 10:07:33 +01:00
Karol Sójko
dc1f19ed04 chore: fix commands 2022-11-04 09:50:36 +01:00
standardci
ff7c52a05e chore(release): publish new version
- @standardnotes/analytics@1.38.0
 - @standardnotes/api-gateway@1.35.1
 - @standardnotes/auth-server@1.49.2
 - @standardnotes/domain-events-infra@1.9.7
 - @standardnotes/domain-events@2.74.0
 - @standardnotes/event-store@1.6.2
 - @standardnotes/files-server@1.8.2
 - @standardnotes/scheduler-server@1.13.3
 - @standardnotes/syncing-server@1.10.10
 - @standardnotes/websockets-server@1.4.2
 - @standardnotes/workspace-server@1.17.2
2022-11-04 08:41:48 +00:00
Karol Sójko
d5684326b1 feat: add analytics worker service 2022-11-04 09:39:30 +01:00
standardci
017c55d190 chore(release): publish new version
- @standardnotes/auth-server@1.49.1
2022-11-03 13:31:06 +00:00
Karol Sójko
2504887e8d fix(auth): updating offline subscription end date 2022-11-03 14:29:17 +01:00
standardci
805e63379c chore(release): publish new version
- @standardnotes/scheduler-server@1.13.2
2022-11-03 10:03:57 +00:00
Karol Sójko
dcb20e6ea6 fix(scheduler): specs 2022-11-03 11:01:55 +01:00
standardci
786b94380b chore(release): publish new version
- @standardnotes/analytics@1.37.0
 - @standardnotes/api-gateway@1.35.0
 - @standardnotes/auth-server@1.49.0
 - @standardnotes/syncing-server@1.10.9
2022-11-03 09:53:56 +00:00
Karol Sójko
460d6a8d0f feat(auth): add analytics for subscription reactivating 2022-11-03 10:51:43 +01:00
standardci
0dbc929c8e chore(release): publish new version
- @standardnotes/api-gateway@1.34.1
 - @standardnotes/auth-server@1.48.2
 - @standardnotes/common@1.44.0
 - @standardnotes/domain-events-infra@1.9.6
 - @standardnotes/domain-events@2.73.1
 - @standardnotes/event-store@1.6.1
 - @standardnotes/files-server@1.8.1
 - @standardnotes/predicates@1.5.3
 - @standardnotes/scheduler-server@1.13.1
 - @standardnotes/security@1.5.3
 - @standardnotes/syncing-server@1.10.8
 - @standardnotes/websockets-server@1.4.1
 - @standardnotes/workspace-server@1.17.1
2022-11-03 09:25:39 +00:00
Karol Sójko
0c5305acf6 feat(common): add subscription cancelled email message identifier 2022-11-03 10:23:18 +01:00
standardci
34139efafb chore(release): publish new version
- @standardnotes/event-store@1.6.0
2022-11-03 09:21:17 +00:00
Karol Sójko
eb53c3896f feat(event-store): add discount events to event store 2022-11-03 10:18:55 +01:00
standardci
2af4c6fb55 chore(release): publish new version
- @standardnotes/scheduler-server@1.13.0
2022-11-03 09:10:52 +00:00
Karol Sójko
d66f784538 feat(scheduler): add publishing exit discount withdraw requested event 2022-11-03 10:08:52 +01:00
standardci
f127241857 chore(release): publish new version
- @standardnotes/auth-server@1.48.1
2022-11-02 13:24:02 +00:00
Karol Sójko
5b0d9dd394 fix(auth): controller name 2022-11-02 14:22:13 +01:00
standardci
ee29d18484 chore(release): publish new version
- @standardnotes/api-gateway@1.34.0
 - @standardnotes/auth-server@1.48.0
 - @standardnotes/event-store@1.5.8
 - @standardnotes/files-server@1.8.0
 - @standardnotes/scheduler-server@1.12.0
 - @standardnotes/syncing-server@1.10.7
 - @standardnotes/time@1.13.0
 - @standardnotes/websockets-server@1.4.0
 - @standardnotes/workspace-server@1.17.0
2022-11-02 12:25:40 +00:00
Karol Sójko
2255f856f9 feat(auth): add processing user requests 2022-11-02 13:23:49 +01:00
standardci
f2415527f0 chore(release): publish new version
- @standardnotes/api-gateway@1.33.6
 - @standardnotes/auth-server@1.47.7
 - @standardnotes/domain-events-infra@1.9.5
 - @standardnotes/domain-events@2.73.0
 - @standardnotes/event-store@1.5.7
 - @standardnotes/files-server@1.7.5
 - @standardnotes/scheduler-server@1.11.7
 - @standardnotes/syncing-server@1.10.6
 - @standardnotes/websockets-server@1.3.5
 - @standardnotes/workspace-server@1.16.6
2022-11-02 10:33:04 +00:00
Karol Sójko
59eb70ce62 feat(domain-events): add exit discount events 2022-11-02 11:31:10 +01:00
standardci
1d18725bc5 chore(release): publish new version
- @standardnotes/api-gateway@1.33.5
 - @standardnotes/auth-server@1.47.6
 - @standardnotes/common@1.43.0
 - @standardnotes/domain-events-infra@1.9.4
 - @standardnotes/domain-events@2.72.1
 - @standardnotes/event-store@1.5.6
 - @standardnotes/files-server@1.7.4
 - @standardnotes/predicates@1.5.2
 - @standardnotes/scheduler-server@1.11.6
 - @standardnotes/security@1.5.2
 - @standardnotes/syncing-server@1.10.5
 - @standardnotes/websockets-server@1.3.4
 - @standardnotes/workspace-server@1.16.5
2022-11-01 09:30:17 +00:00
Karol Sójko
d4af1d743e feat(common): add user request type 2022-11-01 10:28:00 +01:00
standardci
9d1a357b5b chore(release): publish new version
- @standardnotes/auth-server@1.47.5
 - @standardnotes/event-store@1.5.5
 - @standardnotes/scheduler-server@1.11.5
 - @standardnotes/syncing-server@1.10.4
 - @standardnotes/workspace-server@1.16.4
2022-11-01 06:48:36 +00:00
Karol Sójko
5160cc36dd fix: force utf8mb4 charset on typeorm 2022-11-01 07:46:15 +01:00
standardci
f05e1dbdf0 chore(release): publish new version
- @standardnotes/api-gateway@1.33.4
 - @standardnotes/auth-server@1.47.4
 - @standardnotes/common@1.42.0
 - @standardnotes/domain-events-infra@1.9.3
 - @standardnotes/domain-events@2.72.0
 - @standardnotes/event-store@1.5.4
 - @standardnotes/files-server@1.7.3
 - @standardnotes/predicates@1.5.1
 - @standardnotes/scheduler-server@1.11.4
 - @standardnotes/security@1.5.1
 - @standardnotes/syncing-server@1.10.3
 - @standardnotes/websockets-server@1.3.3
 - @standardnotes/workspace-server@1.16.3
2022-10-31 12:55:39 +00:00
Karol Sójko
7b797f0cba feat(domain-events): add exit discount applied event 2022-10-31 13:53:48 +01:00
standardci
f823826044 chore(release): publish new version
- @standardnotes/event-store@1.5.3
2022-10-31 11:01:45 +00:00
Karol Sójko
9589403c9d fix(event-store): add subscription reactivate handler 2022-10-31 11:59:52 +01:00
standardci
2757b18e17 chore(release): publish new version
- @standardnotes/api-gateway@1.33.3
 - @standardnotes/auth-server@1.47.3
 - @standardnotes/domain-events-infra@1.9.2
 - @standardnotes/domain-events@2.71.0
 - @standardnotes/event-store@1.5.2
 - @standardnotes/files-server@1.7.2
 - @standardnotes/scheduler-server@1.11.3
 - @standardnotes/syncing-server@1.10.2
 - @standardnotes/websockets-server@1.3.2
 - @standardnotes/workspace-server@1.16.2
2022-10-31 10:58:12 +00:00
Karol Sójko
6e8481bb2f feat(domain-events): add subscription reactivated event 2022-10-31 11:56:09 +01:00
standardci
72760d942e chore(release): publish new version
- @standardnotes/api-gateway@1.33.2
 - @standardnotes/auth-server@1.47.2
 - @standardnotes/domain-events-infra@1.9.1
 - @standardnotes/domain-events@2.70.0
 - @standardnotes/event-store@1.5.1
 - @standardnotes/files-server@1.7.1
 - @standardnotes/scheduler-server@1.11.2
 - @standardnotes/syncing-server@1.10.1
 - @standardnotes/websockets-server@1.3.1
 - @standardnotes/workspace-server@1.16.1
2022-10-26 09:08:06 +00:00
Karol Sójko
88d4d211b8 feat(domain-events): add subscription reactivation discount requested event 2022-10-26 11:05:49 +02:00
standardci
abfa373083 chore(release): publish new version
- @standardnotes/api-gateway@1.33.1
2022-10-24 13:30:10 +00:00
Karol Sójko
23b05caea2 fix(api-gateway): remove invite declining endpoint 2022-10-24 15:27:20 +02:00
standardci
d3f4027c3c chore(release): publish new version
- @standardnotes/auth-server@1.47.1
2022-10-24 13:26:41 +00:00
Karol Sójko
f8433c106f fix(auth): accepting shared subscription for inviters with multiple subscriptions 2022-10-24 15:24:45 +02:00
standardci
39d7a09cdf chore(release): publish new version
- @standardnotes/api-gateway@1.33.0
 - @standardnotes/auth-server@1.47.0
 - @standardnotes/websockets-server@1.3.0
 - @standardnotes/workspace-server@1.16.0
2022-10-24 11:46:41 +00:00
Karol Sójko
771a555b4f feat(auth): change accepting invitations to be an authorized endpoint 2022-10-24 13:44:45 +02:00
standardci
4ea7309001 chore(release): publish new version
- @standardnotes/auth-server@1.46.1
2022-10-20 12:05:01 +00:00
Karol Sójko
126e6a3c2f fix(auth): additional response message to accepting invitation 2022-10-20 14:02:30 +02:00
Karol Sójko
53be3a2f83 fix: linting command for syncing server 2022-10-20 13:37:02 +02:00
Karol Sójko
655409d078 fix: workspace name for auth 2022-10-20 13:33:17 +02:00
Karol Sójko
43f68900ff fix: docker image definition 2022-10-20 13:11:27 +02:00
Karol Sójko
01597a2518 fix: add aws_ecr_registry secret declaration 2022-10-20 13:07:51 +02:00
Karol Sójko
fd7a38ead1 fix: deploying worker images 2022-10-20 13:04:47 +02:00
standardci
f777e1f168 chore(release): publish new version
- @standardnotes/scheduler-server@1.11.1
2022-10-20 10:44:42 +00:00
Karol Sójko
23ced9427f fix(scheduler): add wait-for script for docker purposes 2022-10-20 12:42:27 +02:00
Karol Sójko
c9fd718af4 fix: run e2e on all applications 2022-10-20 12:31:08 +02:00
Karol Sójko
072c2770b1 fix: common server application workflow name 2022-10-20 10:08:35 +02:00
Karol Sójko
54e4775ca3 fix: workflow names 2022-10-20 10:07:57 +02:00
Karol Sójko
d4849cb4c2 fix: worker service name 2022-10-20 10:06:12 +02:00
Karol Sójko
38cd19281f fix: duplicate node name 2022-10-20 10:04:55 +02:00
Karol Sójko
1eaaa31c4e fix: workflows naming conention 2022-10-20 10:03:21 +02:00
Karol Sójko
256f070700 fix: workflows at root directory requirement 2022-10-20 10:01:29 +02:00
Karol Sójko
400f3593b2 fix: rearrange workflows 2022-10-20 09:59:52 +02:00
Karol Sójko
475a9559cf fix: add debug flag for docker buildx 2022-10-20 09:30:28 +02:00
Karol Sójko
cbf7d8c7a4 fix: configure ecr registry for Docker 2022-10-19 15:15:58 +02:00
Karol Sójko
2d7cee9d14 fix: syncing server release workflow 2022-10-19 14:54:17 +02:00
Karol Sójko
ef05946832 fix: scheduler release workflow 2022-10-19 14:51:59 +02:00
Karol Sójko
24a9078b22 fix: accessing job outputs 2022-10-19 14:48:45 +02:00
Karol Sójko
c5d19ad0b2 fix: files release workflow 2022-10-19 14:25:04 +02:00
Karol Sójko
f004653286 fix: event store release workflow 2022-10-19 14:23:02 +02:00
Karol Sójko
4850807ac1 fix: outputs referencing 2022-10-19 14:21:07 +02:00
Karol Sójko
526a21dde3 fix: cache directories 2022-10-19 14:16:03 +02:00
Karol Sójko
9a3ab6d1c1 fix: bundle temp dir cache setup 2022-10-19 14:12:16 +02:00
Karol Sójko
6bde0ec7ab fix: auth release workflow 2022-10-19 14:02:46 +02:00
Karol Sójko
5b1d755670 fix: job conditionals 2022-10-19 13:59:23 +02:00
Karol Sójko
e58d2ec233 fix: bundling and publishing to separate registries 2022-10-19 13:57:02 +02:00
Karol Sójko
6742655a04 fix: debug parameter passing 2022-10-19 13:42:54 +02:00
Karol Sójko
02b36a1c11 fix: api-gateway release workflow 2022-10-19 13:38:05 +02:00
Karol Sójko
363c236d3e fix: websockets workflow 2022-10-19 13:30:49 +02:00
Karol Sójko
c49634ae18 fix: add missing docker buildx setup for publishing 2022-10-19 13:22:34 +02:00
Karol Sójko
8fd06c4c8c fix: docker tags on publishing workflow 2022-10-19 11:42:52 +02:00
Karol Sójko
935661ed35 fix: temp dir creation 2022-10-19 11:27:29 +02:00
Karol Sójko
6764250f6d fix: common workflow 2022-10-19 11:12:49 +02:00
standardci
403189c9e9 chore(release): publish new version
- @standardnotes/analytics@1.36.0
 - @standardnotes/api-gateway@1.32.0
 - @standardnotes/auth-server@1.46.0
 - @standardnotes/common@1.41.0
 - @standardnotes/domain-events-infra@1.9.0
 - @standardnotes/domain-events@2.69.0
 - @standardnotes/event-store@1.5.0
 - @standardnotes/files-server@1.7.0
 - @standardnotes/predicates@1.5.0
 - @standardnotes/scheduler-server@1.11.0
 - @standardnotes/security@1.5.0
 - @standardnotes/settings@1.18.0
 - @standardnotes/sncrypto-node@1.12.0
 - @standardnotes/syncing-server@1.10.0
 - @standardnotes/time@1.12.0
 - @standardnotes/websockets-server@1.2.0
 - @standardnotes/workspace-server@1.15.0
2022-10-19 08:59:00 +00:00
Karol Sójko
b66d8f9d0d Merge pull request #320 from standardnotes/arm64
feat: building server applications in ARM64 architecture for Docker
2022-10-19 10:56:48 +02:00
Karol Sójko
1c8a9f1dc9 fix: test setup 2022-10-19 10:48:06 +02:00
Karol Sójko
f1e63de661 fix: linter issues 2022-10-19 10:36:30 +02:00
Karol Sójko
fd92866ba1 feat: building server applications in ARM64 architecture for Docker 2022-10-19 10:25:01 +02:00
standardci
745c0b5f73 chore(release): publish new version
- @standardnotes/workspace-server@1.14.6
2022-10-17 08:55:46 +00:00
Karol Sójko
b6f3954e24 fix(workspaces): accepting invitations 2022-10-17 10:53:59 +02:00
standardci
4ef97ee058 chore(release): publish new version
- @standardnotes/workspace-server@1.14.5
2022-10-17 08:36:07 +00:00
Karol Sójko
6af8ff700e fix(workspaces): allow type of workspace to come from parameters 2022-10-17 10:34:20 +02:00
standardci
7c323a915c chore(release): publish new version
- @standardnotes/workspace-server@1.14.4
2022-10-17 08:04:42 +00:00
Karol Sójko
365d316878 fix(workspaces): listing workspace uuids 2022-10-17 10:02:46 +02:00
Karol Sójko
c40f1312ca fix(syncing-server): github workflow 2022-10-17 09:43:58 +02:00
Karol Sójko
528cd829fd fix(websockets): github workflow 2022-10-17 09:39:53 +02:00
Karol Sójko
fd170f3bad fix(workspaces): cache key 2022-10-17 09:20:43 +02:00
standardci
17388d252b chore(release): publish new version
- @standardnotes/workspace-server@1.14.3
2022-10-17 07:14:13 +00:00
Karol Sójko
d232e71683 fix(workspaces): add debug logs for listing workspaces 2022-10-17 09:12:17 +02:00
standardci
d11928dee7 chore(release): publish new version
- @standardnotes/workspace-server@1.14.2
2022-10-14 12:35:24 +00:00
Karol Sójko
0cacc8efa0 fix(workspace): fetching users workspaces list 2022-10-14 14:33:09 +02:00
Karol Sójko
63b2436d81 chore: fix caching paths 2022-10-14 12:18:47 +02:00
Karol Sójko
faacf92ba3 chore: improve deploy workflow for workspaces 2022-10-14 12:11:43 +02:00
standardci
f0f3dad082 chore(release): publish new version
- @standardnotes/workspace-server@1.14.1
2022-10-14 09:46:43 +00:00
Karol Sójko
d2fcc761ad fix(workspaces): reading response locals when listing workspaces 2022-10-14 11:44:25 +02:00
standardci
79c00b0e7a chore(release): publish new version
- @standardnotes/api-gateway@1.31.2
2022-10-13 11:11:09 +00:00
Karol Sójko
219b1baa41 fix(api-gateway): make web sockets url optional 2022-10-13 13:09:18 +02:00
standardci
c0cb7f7a92 chore(release): publish new version
- @standardnotes/api-gateway@1.31.1
 - @standardnotes/auth-server@1.45.0
 - @standardnotes/domain-events-infra@1.8.27
 - @standardnotes/domain-events@2.68.0
 - @standardnotes/event-store@1.4.6
 - @standardnotes/files-server@1.6.18
 - @standardnotes/scheduler-server@1.10.46
 - @standardnotes/syncing-server@1.9.8
 - @standardnotes/websockets-server@1.1.3
 - @standardnotes/workspace-server@1.14.0
2022-10-13 10:52:01 +00:00
Karol Sójko
86379eb96d feat: publish workspace invite accepted event for websockets 2022-10-13 12:50:10 +02:00
standardci
f7762a97e3 chore(release): publish new version
- @standardnotes/api-gateway@1.31.0
 - @standardnotes/auth-server@1.44.0
2022-10-13 10:25:22 +00:00
Karol Sójko
86ae4a59a3 feat(auth): remove websocket handling in favor of websockets service 2022-10-13 12:23:14 +02:00
standardci
863e8555ae chore(release): publish new version
- @standardnotes/websockets-server@1.1.2
2022-10-13 10:11:43 +00:00
Karol Sójko
4e21edce6b fix(websockets): add http client binding 2022-10-13 12:09:20 +02:00
standardci
5663841145 chore(release): publish new version
- @standardnotes/websockets-server@1.1.1
2022-10-13 09:59:16 +00:00
Karol Sójko
2f7ef497ab fix(websockets): remove unnecessary sns bindings 2022-10-13 11:57:09 +02:00
standardci
ace63cfcc1 chore(release): publish new version
- @standardnotes/api-gateway@1.30.1
 - @standardnotes/auth-server@1.43.1
 - @standardnotes/common@1.40.0
 - @standardnotes/domain-events-infra@1.8.26
 - @standardnotes/domain-events@2.67.0
 - @standardnotes/event-store@1.4.5
 - @standardnotes/files-server@1.6.17
 - @standardnotes/predicates@1.4.11
 - @standardnotes/scheduler-server@1.10.45
 - @standardnotes/security@1.4.9
 - @standardnotes/syncing-server@1.9.7
 - @standardnotes/websockets-server@1.1.0
 - @standardnotes/workspace-server@1.13.2
2022-10-13 09:42:21 +00:00
Karol Sójko
d28c268e86 feat(websockets): add websockets service 2022-10-13 11:40:06 +02:00
standardci
6f43726a3b chore(release): publish new version
- @standardnotes/workspace-server@1.13.1
2022-10-12 13:22:13 +00:00
Karol Sójko
4f6a2a83d3 fix(workspace): add workspace to workspace user foreign keys 2022-10-12 15:20:33 +02:00
standardci
937ce5a157 chore(release): publish new version
- @standardnotes/api-gateway@1.30.0
 - @standardnotes/auth-server@1.43.0
 - @standardnotes/workspace-server@1.13.0
2022-10-12 12:47:21 +00:00
Karol Sójko
0c1a779ef0 feat(workspace): add endpoints for initiating keyshare in a workspace 2022-10-12 14:45:43 +02:00
standardci
e01d1f44d0 chore(release): publish new version
- @standardnotes/workspace-server@1.12.0
2022-10-12 11:02:28 +00:00
Karol Sójko
cea9021c16 feat(workspace): add initiating key share 2022-10-12 13:00:24 +02:00
standardci
3039f58b5a chore(release): publish new version
- @standardnotes/api-gateway@1.29.0
 - @standardnotes/auth-server@1.42.0
 - @standardnotes/workspace-server@1.11.0
2022-10-11 13:30:43 +00:00
Karol Sójko
e2326190d4 fix: add missing dependency 2022-10-11 15:29:03 +02:00
Karol Sójko
095d13f8bb feat: add listin worspaces and workspace users 2022-10-11 15:24:21 +02:00
standardci
1292d1d898 chore(release): publish new version
- @standardnotes/api-gateway@1.28.2
 - @standardnotes/auth-server@1.41.2
 - @standardnotes/common@1.39.0
 - @standardnotes/domain-events-infra@1.8.25
 - @standardnotes/domain-events@2.66.3
 - @standardnotes/event-store@1.4.4
 - @standardnotes/files-server@1.6.16
 - @standardnotes/predicates@1.4.10
 - @standardnotes/scheduler-server@1.10.44
 - @standardnotes/security@1.4.8
 - @standardnotes/syncing-server@1.9.6
 - @standardnotes/workspace-server@1.10.0
2022-10-11 10:01:41 +00:00
Karol Sójko
8bc92616d2 feat(workspace): extract workspace user status to common 2022-10-11 12:00:01 +02:00
standardci
ae45fafaee chore(release): publish new version
- @standardnotes/api-gateway@1.28.1
 - @standardnotes/auth-server@1.41.1
 - @standardnotes/common@1.38.0
 - @standardnotes/domain-events-infra@1.8.24
 - @standardnotes/domain-events@2.66.2
 - @standardnotes/event-store@1.4.3
 - @standardnotes/files-server@1.6.15
 - @standardnotes/predicates@1.4.9
 - @standardnotes/scheduler-server@1.10.43
 - @standardnotes/security@1.4.7
 - @standardnotes/syncing-server@1.9.5
 - @standardnotes/workspace-server@1.9.0
2022-10-11 09:54:42 +00:00
Karol Sójko
f74227067b feat(workspace): add invite access level 2022-10-11 11:52:31 +02:00
standardci
5f76d25ec3 chore(release): publish new version
- @standardnotes/workspace-server@1.8.0
2022-10-11 09:33:00 +00:00
Karol Sójko
ba9d3bfe46 feat(workspace): add workspace user display name 2022-10-11 11:30:49 +02:00
standardci
3dc6babfca chore(release): publish new version
- @standardnotes/workspace-server@1.7.0
2022-10-11 08:02:58 +00:00
Karol Sójko
ace2b6936a feat(workspace): accepting invitation 2022-10-11 10:01:13 +02:00
standardci
712e874bfe chore(release): publish new version
- @standardnotes/api-gateway@1.28.0
 - @standardnotes/auth-server@1.41.0
 - @standardnotes/workspace-server@1.6.0
2022-10-11 07:44:12 +00:00
Karol Sójko
266adda45b feat(workspace): add invite to workspace endpoints 2022-10-11 09:41:45 +02:00
standardci
f5ebe4a69e chore(release): publish new version
- @standardnotes/api-gateway@1.27.4
 - @standardnotes/auth-server@1.40.4
 - @standardnotes/common@1.37.0
 - @standardnotes/domain-events-infra@1.8.23
 - @standardnotes/domain-events@2.66.1
 - @standardnotes/event-store@1.4.2
 - @standardnotes/files-server@1.6.14
 - @standardnotes/predicates@1.4.8
 - @standardnotes/scheduler-server@1.10.42
 - @standardnotes/security@1.4.6
 - @standardnotes/syncing-server@1.9.4
 - @standardnotes/workspace-server@1.5.1
2022-10-10 10:34:40 +00:00
Karol Sójko
15d960d47b feat(common): add WORKSPACE_INVITE_CREATED email message identifier 2022-10-10 12:32:35 +02:00
standardci
f700b04b8f chore(release): publish new version
- @standardnotes/api-gateway@1.27.3
 - @standardnotes/auth-server@1.40.3
 - @standardnotes/domain-events-infra@1.8.22
 - @standardnotes/domain-events@2.66.0
 - @standardnotes/event-store@1.4.1
 - @standardnotes/files-server@1.6.13
 - @standardnotes/scheduler-server@1.10.41
 - @standardnotes/syncing-server@1.9.3
 - @standardnotes/workspace-server@1.5.0
2022-10-10 10:23:57 +00:00
Karol Sójko
6f9683c41a feat(workspace): add publishing workspace invite created 2022-10-10 12:22:19 +02:00
standardci
0ad605c906 chore(release): publish new version
- @standardnotes/api-gateway@1.27.2
 - @standardnotes/auth-server@1.40.2
 - @standardnotes/domain-events-infra@1.8.21
 - @standardnotes/domain-events@2.65.0
 - @standardnotes/event-store@1.4.0
 - @standardnotes/files-server@1.6.12
 - @standardnotes/scheduler-server@1.10.40
 - @standardnotes/syncing-server@1.9.2
 - @standardnotes/workspace-server@1.4.1
2022-10-10 10:09:16 +00:00
Karol Sójko
db4c49c57b feat: add workspace invite created event 2022-10-10 12:07:23 +02:00
standardci
b5c72dda8f chore(release): publish new version
- @standardnotes/workspace-server@1.4.0
2022-10-10 09:41:14 +00:00
Karol Sójko
e06cc3ba80 feat(workspace): add inviting to workspace 2022-10-10 11:38:59 +02:00
standardci
8a72a1a559 chore(release): publish new version
- @standardnotes/workspace-server@1.3.0
2022-10-10 08:52:50 +00:00
Karol Sójko
3f61d3163e feat(workspace): add creating root workspace upon user registration 2022-10-10 10:51:16 +02:00
standardci
34b3c7ce16 chore(release): publish new version
- @standardnotes/workspace-server@1.2.3
2022-10-10 08:33:46 +00:00
Karol Sójko
0ce4185379 fix(workspace): add optional parameters to creating workspace 2022-10-10 10:31:45 +02:00
standardci
1f7989dbed chore(release): publish new version
- @standardnotes/api-gateway@1.27.1
 - @standardnotes/auth-server@1.40.1
 - @standardnotes/common@1.36.1
 - @standardnotes/domain-events-infra@1.8.20
 - @standardnotes/domain-events@2.64.1
 - @standardnotes/event-store@1.3.25
 - @standardnotes/files-server@1.6.11
 - @standardnotes/predicates@1.4.7
 - @standardnotes/scheduler-server@1.10.39
 - @standardnotes/security@1.4.5
 - @standardnotes/syncing-server@1.9.1
 - @standardnotes/workspace-server@1.2.2
2022-10-10 08:26:57 +00:00
Karol Sójko
0ea88ad202 fix(workspace): extract workspace type to common types 2022-10-10 10:25:00 +02:00
standardci
2d41742c34 chore(release): publish new version
- @standardnotes/workspace-server@1.2.1
2022-10-10 08:11:37 +00:00
Karol Sójko
447d600dbe fix(workspace): rename private key to encrypted private key 2022-10-10 10:09:49 +02:00
standardci
3f6db48f83 chore(release): publish new version
- @standardnotes/api-gateway@1.27.0
 - @standardnotes/workspace-server@1.2.0
2022-10-07 11:06:37 +00:00
Karol Sójko
156ab65272 feat: add workspaces creation 2022-10-07 13:05:00 +02:00
standardci
a986ee1ccb chore(release): publish new version
- @standardnotes/api-gateway@1.26.2
 - @standardnotes/auth-server@1.40.0
 - @standardnotes/common@1.36.0
 - @standardnotes/domain-events-infra@1.8.19
 - @standardnotes/domain-events@2.64.0
 - @standardnotes/event-store@1.3.24
 - @standardnotes/files-server@1.6.10
 - @standardnotes/predicates@1.4.6
 - @standardnotes/scheduler-server@1.10.38
 - @standardnotes/security@1.4.4
 - @standardnotes/syncing-server@1.9.0
 - @standardnotes/workspace-server@1.1.2
2022-10-07 09:24:41 +00:00
Karol Sójko
868b7d149a feat: add user protocol version to the user registration event 2022-10-07 11:22:56 +02:00
standardci
b1763b539e chore(release): publish new version
- @standardnotes/auth-server@1.39.2
2022-10-06 13:40:42 +00:00
Karol Sójko
d21517abe6 fix(auth): add warning logs for unrecognized payment type 2022-10-06 13:30:47 +02:00
Karol Sójko
7ef6765d5b chore: upgrade dependabot 2022-10-06 13:05:37 +02:00
Karol Sójko
11492977c9 Merge pull request #157 from standardnotes/dependabot/github_actions/crazy-max/ghaction-import-gpg-5
chore(deps): bump crazy-max/ghaction-import-gpg from 4 to 5
2022-10-06 12:48:55 +02:00
dependabot[bot]
d133c5aacd chore(deps): bump crazy-max/ghaction-import-gpg from 4 to 5
Bumps [crazy-max/ghaction-import-gpg](https://github.com/crazy-max/ghaction-import-gpg) from 4 to 5.
- [Release notes](https://github.com/crazy-max/ghaction-import-gpg/releases)
- [Changelog](https://github.com/crazy-max/ghaction-import-gpg/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crazy-max/ghaction-import-gpg/compare/v4...v5)

---
updated-dependencies:
- dependency-name: crazy-max/ghaction-import-gpg
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 06:31:27 +00:00
2706 changed files with 36260 additions and 24906 deletions

View File

@@ -85,6 +85,11 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/packages/workspace"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:

39
.github/workflows/analytics.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Analytics Server
concurrency:
group: analytics
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/analytics*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: analytics
workspace_name: "@standardnotes/analytics"
e2e_tag_parameter_name: analytics_image_tag
deploy_web: false
package_path: packages/analytics
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_ANALYTICS_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -1,161 +0,0 @@
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 }}"

37
.github/workflows/api-gateway.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Api Gateway
concurrency:
group: api_gateway
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/api-gateway*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: api-gateway
workspace_name: "@standardnotes/api-gateway"
e2e_tag_parameter_name: api_gateway_image_tag
deploy_worker: false
package_path: packages/api-gateway
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_API_GATEWAY_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -1,206 +0,0 @@
name: Auth Server
concurrency:
group: auth
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/auth-server*'
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: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
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: auth
IMAGE_TAG: ${{ github.sha }}
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: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/auth-server -t standardnotes/auth:latest
docker push standardnotes/auth: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 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-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: 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-prod.outputs.task-definition }}
service: auth-prod
cluster: prod
wait-for-service-stability: true
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 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-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: 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-prod.outputs.task-definition }}
service: auth-worker-prod
cluster: prod
wait-for-service-stability: true
newrelic:
needs: [ deploy-web, deploy-worker ]
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_AUTH_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_AUTH_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

46
.github/workflows/auth.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Auth Server
concurrency:
group: auth
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/auth-server*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: auth
workspace_name: "@standardnotes/auth-server"
e2e_tag_parameter_name: auth_image_tag
package_path: packages/auth
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_AUTH_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_AUTH_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

55
.github/workflows/common-deploy.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Reusable Server Application Deployment Workflow
on:
workflow_call:
inputs:
service_name:
required: true
type: string
docker_image:
required: true
type: string
secrets:
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
AWS_ECR_REGISTRY:
required: true
jobs:
deploy:
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 ${{ inputs.service_name }}-prod --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="${{ inputs.service_name }}-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: ${{ inputs.service_name }}-prod
image: ${{ secrets.AWS_ECR_REGISTRY }}/${{ inputs.docker_image }}
- 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: ${{ inputs.service_name }}-prod
cluster: prod
wait-for-service-stability: true

View File

@@ -0,0 +1,96 @@
name: Reusable Publish Docker Image Workflow
on:
workflow_call:
inputs:
service_name:
required: true
type: string
bundle_dir:
required: true
type: string
package_path:
required: true
type: string
workspace_name:
required: true
type: string
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ inputs.bundle_dir }}
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build ${{ inputs.package_path }}
- name: Bundle
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ inputs.bundle_dir }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- 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: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Publish Docker image
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: ${{ inputs.bundle_dir }}
file: ${{ inputs.bundle_dir }}/${{ inputs.package_path }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
standardnotes/${{ inputs.service_name }}:latest
standardnotes/${{ inputs.service_name }}:${{ github.sha }}
${{ steps.login-ecr.outputs.registry }}/${{ inputs.service_name }}:${{ github.sha }}
${{ steps.login-ecr.outputs.registry }}/${{ inputs.service_name }}:latest

View File

@@ -0,0 +1,236 @@
name: Reusable Server Application Workflow
on:
workflow_call:
inputs:
service_name:
required: true
type: string
workspace_name:
required: true
type: string
deploy_web:
required: false
default: true
type: boolean
deploy_worker:
required: false
default: true
type: boolean
e2e_tag_parameter_name:
required: false
type: string
package_path:
required: true
type: string
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
CI_PAT_TOKEN:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
build:
runs-on: ubuntu-latest
outputs:
temp_dir: ${{ steps.bundle-dir.outputs.temp_dir }}
steps:
- uses: actions/checkout@v3
- name: Create Bundle Dir
id: bundle-dir
run: echo "temp_dir=$(mktemp -d -t ${{ inputs.service_name }}-${{ github.sha }}-XXXXXXX)" >> $GITHUB_OUTPUT
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ steps.bundle-dir.outputs.temp_dir }}
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
run: yarn build ${{ inputs.package_path }}
- name: Bundle
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ steps.bundle-dir.outputs.temp_dir }}
lint:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build ${{ inputs.package_path }}
- name: Lint
run: yarn lint:${{ inputs.service_name }}
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build ${{ inputs.package_path }}
- name: Test
run: yarn test ${{ inputs.package_path }}
e2e:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build ${{ inputs.package_path }}
- name: Bundle
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ needs.build.outputs.temp_dir }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Publish Docker image for E2E testing
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: ${{ needs.build.outputs.temp_dir }}
file: ${{ needs.build.outputs.temp_dir }}/${{ inputs.package_path }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: standardnotes/${{ inputs.service_name }}:${{ github.sha }}
- name: Run E2E test suite
uses: convictional/trigger-workflow-and-wait@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: '{"${{ inputs.e2e_tag_parameter_name }}": "${{ github.sha }}"}'
propagate_failure: true
trigger_workflow: true
wait_workflow: true
publish:
needs: [ build, test, lint, e2e ]
name: Publish Docker Image
uses: standardnotes/server/.github/workflows/common-docker-image.yml@main
with:
service_name: ${{ inputs.service_name }}
bundle_dir: ${{ needs.build.outputs.temp_dir }}
package_path: ${{ inputs.package_path }}
workspace_name: ${{ inputs.workspace_name }}
secrets: inherit
deploy-web:
if: ${{ inputs.deploy_web }}
needs: publish
name: Deploy Web
uses: standardnotes/server/.github/workflows/common-deploy.yml@main
with:
service_name: ${{ inputs.service_name }}
docker_image: ${{ inputs.service_name }}:${{ github.sha }}
secrets: inherit
deploy-worker:
if: ${{ inputs.deploy_worker }}
needs: publish
name: Deploy Worker
uses: standardnotes/server/.github/workflows/common-deploy.yml@main
with:
service_name: ${{ inputs.service_name }}-worker
docker_image: ${{ inputs.service_name }}:${{ github.sha }}
secrets: inherit

View File

@@ -1,136 +0,0 @@
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 }}"

39
.github/workflows/event-store.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Event Store
concurrency:
group: event-store
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/event-store*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: event-store
workspace_name: "@standardnotes/event-store"
e2e_tag_parameter_name: event_store_image_tag
deploy_web: false
package_path: packages/event-store
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_EVENT_STORE_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -1,206 +0,0 @@
name: Files Server
concurrency:
group: files
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/files-server*'
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: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
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: files
IMAGE_TAG: ${{ github.sha }}
run: |
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: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/files-server -t standardnotes/files:latest
docker push standardnotes/files: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 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-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: 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-prod.outputs.task-definition }}
service: files-prod
cluster: prod
wait-for-service-stability: true
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 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-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: 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-prod.outputs.task-definition }}
service: files-worker-prod
cluster: prod
wait-for-service-stability: true
newrelic:
needs: [ deploy-web, deploy-worker ]
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_FILES_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_FILES_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

46
.github/workflows/files.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Files Server
concurrency:
group: files
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/files-server*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: files
workspace_name: "@standardnotes/files-server"
e2e_tag_parameter_name: files_image_tag
package_path: packages/files
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_FILES_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_FILES_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -1,136 +0,0 @@
name: Scheduler Server
concurrency:
group: scheduler
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/scheduler-server*'
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:scheduler
- run: yarn test:scheduler
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: scheduler-worker
IMAGE_TAG: ${{ github.sha }}
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: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/scheduler-server -t standardnotes/scheduler:${{ github.sha }}
docker push standardnotes/scheduler:${{ github.sha }}
docker tag standardnotes/scheduler:${{ github.sha }} standardnotes/scheduler:latest
docker push standardnotes/scheduler: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 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-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: 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-prod.outputs.task-definition }}
service: scheduler-worker-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_SCHEDULER_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

39
.github/workflows/scheduler.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Scheduler Server
concurrency:
group: scheduler
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/scheduler-server*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: scheduler
workspace_name: "@standardnotes/scheduler-server"
e2e_tag_parameter_name: scheduler_image_tag
deploy_web: false
package_path: packages/scheduler
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SCHEDULER_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -1,48 +0,0 @@
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>

View File

@@ -1,206 +0,0 @@
name: Syncing Server
concurrency:
group: syncing_server
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/syncing-server*'
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: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
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: syncing-server-js
IMAGE_TAG: ${{ github.sha }}
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: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/syncing-server -t standardnotes/syncing-server-js:latest
docker push standardnotes/syncing-server-js: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 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-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: 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-prod.outputs.task-definition }}
service: syncing-server-js-prod
cluster: prod
wait-for-service-stability: true
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 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-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: 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-prod.outputs.task-definition }}
service: syncing-server-js-worker-prod
cluster: prod
wait-for-service-stability: true
newrelic:
needs: [ deploy-web, deploy-worker ]
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_SYNCING_SERVER_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SYNCING_SERVER_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

46
.github/workflows/syncing-server.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Syncing Server
concurrency:
group: syncing_server
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/syncing-server*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: syncing-server-js
workspace_name: "@standardnotes/syncing-server"
e2e_tag_parameter_name: syncing_server_js_image_tag
package_path: packages/syncing-server
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SYNCING_SERVER_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SYNCING_SERVER_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

46
.github/workflows/websockets.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Websockets Server
concurrency:
group: websockets
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/websockets-server*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: websockets
workspace_name: "@standardnotes/websockets-server"
e2e_tag_parameter_name: websockets_image_tag
package_path: packages/websockets
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WEBSOCKETS_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WEBSOCKETS_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -1,206 +0,0 @@
name: Workspace Server
concurrency:
group: workspace
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/workspace-server*'
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:workspace
- name: Test
run: yarn test:workspace
- 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/workspace-server -t standardnotes/workspace:${{ github.sha }}
docker push standardnotes/workspace:${{ 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: '{"workspace_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: workspace
IMAGE_TAG: ${{ github.sha }}
run: |
yarn docker build @standardnotes/workspace-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: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/workspace-server -t standardnotes/workspace:latest
docker push standardnotes/workspace: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 workspace-prod --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="workspace-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: workspace-prod
image: ${{ secrets.AWS_ECR_REGISTRY }}/workspace:${{ 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: workspace-prod
cluster: prod
wait-for-service-stability: true
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 workspace-worker-prod --query taskDefinition > task-definition.json
- name: Fill in the new version in the Amazon ECS task definition
run: |
jq '(.containerDefinitions[] | select(.name=="workspace-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-prod
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: workspace-worker-prod
image: ${{ secrets.AWS_ECR_REGISTRY }}/workspace:${{ 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: workspace-worker-prod
cluster: prod
wait-for-service-stability: true
newrelic:
needs: [ deploy-web, deploy-worker ]
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

48
.github/workflows/workspace.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Workspace Server
concurrency:
group: workspace
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/workspace-server*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: workspace
workspace_name: "@standardnotes/workspace-server"
e2e_tag_parameter_name: workspace_image_tag
package_path: packages/workspace
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WORKSPACE_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

34396
.pnp.cjs generated

File diff suppressed because one or more lines are too long

1866
.pnp.loader.mjs 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.

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