Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

feat: ✨ fourmilier devops #96

Merged
merged 51 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c5fb950
feat: ✨ scoped types package
ap0nia Sep 7, 2023
575eccb
feat: ✨ utils workspace package in libs
ap0nia Sep 7, 2023
5cbbb62
feat: ✨ api-fourmilier and ant-stack lambda shims
ap0nia Sep 7, 2023
3416631
feat: ✨ db setup
ap0nia Sep 7, 2023
cf2f856
feat: ✨ calendar
ap0nia Sep 7, 2023
d9c8938
feat: ✨ courses endpoint
ap0nia Sep 7, 2023
ca5ce30
feat: ✨ grades endpoint
ap0nia Sep 7, 2023
5081e55
feat: ✨ instructors endpoint
ap0nia Sep 7, 2023
d97acb2
feat: ✨ larc endpoint
ap0nia Sep 7, 2023
4b3d04f
feat: ✨ week endpoint
ap0nia Sep 7, 2023
72fcb40
feat: ✨ websoc endpoint
ap0nia Sep 7, 2023
bd6e904
feat: ✨ api override props
ap0nia Sep 7, 2023
8ae16ef
fix: 🐛 api lambda client method call
ap0nia Sep 7, 2023
6079d90
fix: 🐛 install typescript in project root
ap0nia Sep 7, 2023
6b032ac
fix: 🐛 type import paths
ap0nia Sep 7, 2023
def1b6e
fix: 🐛 typescript issues
ap0nia Sep 7, 2023
a353dd1
fix: 🐛 missing packages in root
ap0nia Sep 7, 2023
86f8425
fix: 🐛 missing aws-lambda types
ap0nia Sep 7, 2023
b3c213f
feat: ✨ upgraded bronya, compression, logger
ap0nia Sep 7, 2023
25985e3
chore: 🔧 address feedback
ap0nia Sep 7, 2023
93547be
chore: 🔧 remove old api, dev deps
ap0nia Sep 7, 2023
d6049d9
chore: 🔧 remove dotenv
ap0nia Sep 7, 2023
76943a6
chore: 🔧 make constructor private
ap0nia Sep 7, 2023
956fd3a
chore: 🔧 pin everything
ap0nia Sep 8, 2023
7446a43
chore: 🔧 more pins
ap0nia Sep 8, 2023
7550350
feat: ✨ warming request
ap0nia Sep 8, 2023
a9e7a5c
chore: 🔧 remove ant-stack
ap0nia Sep 8, 2023
ca57230
chore: 🔧 remove unscoped types package
ap0nia Sep 8, 2023
d1d1801
chore: 🔧 remove ant-stack config
ap0nia Sep 8, 2023
9635347
fix: 🐛 all typescript issues
ap0nia Sep 8, 2023
2a1ac95
feat: ✨ uci-api package and registrar
ap0nia Sep 8, 2023
bdbb936
feat: ✨ websoc api
ap0nia Sep 8, 2023
eee5bd8
feat: ✨ migrate to uc-irvine/api
ap0nia Sep 8, 2023
1e6f5c7
chore: 🔧 remove utils package, api routes in src/routes
ap0nia Sep 8, 2023
bd28bbe
chore: 🔧 remove build step from uci-api
ap0nia Sep 8, 2023
0cf33b2
chore: 🔧 remove build ant-stack step
ap0nia Sep 8, 2023
e2bd452
chore: 🔧 remove individual cdk setups
ap0nia Sep 8, 2023
d4c5818
feat: ✨ new cdk package
ap0nia Sep 8, 2023
c89e9aa
feat: ✨ docs stack
ap0nia Sep 8, 2023
8d5868c
feat: ✨ services stack
ap0nia Sep 8, 2023
56008dc
refactor: ♻️ start simplifying workflows
ap0nia Sep 8, 2023
c3f019d
feat: ✨ all cdk apps in dedicated package
ap0nia Sep 8, 2023
9ef0129
chore: 🔧 update lockfile
ap0nia Sep 8, 2023
c794c5d
chore: 🔧 update all workflows
ap0nia Sep 8, 2023
4161dc0
Update apps/api/package.json
ap0nia Sep 8, 2023
f9574ba
chore: 🔧 move uc-irvine-api
ap0nia Sep 8, 2023
9b65441
feat: ✨ migrate graphql endpoint (#97)
ecxyzzy Sep 8, 2023
f7f7db9
feat: ✨ restore deployment feature parity (#99)
ecxyzzy Oct 15, 2023
fcc1186
chore: 🔧 merge main into fourmilier
ecxyzzy Oct 15, 2023
4758dd8
refactor: ♻️ quick config fix (#101)
ap0nia Oct 16, 2023
d064fc7
chore: 🔧 update configs
ecxyzzy Oct 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.json", "./apps/docs/tsconfig.json", "./apps/docs/cdk/tsconfig.json"],
project: ["./tsconfig.json", "./apps/docs/tsconfig.json"],
sourceType: "module",
},
plugins: ["import", "@typescript-eslint"],
Expand Down Expand Up @@ -38,7 +38,7 @@ const config = {
},
],
},
ignorePatterns: ["*.config.*", "*.cjs"],
ignorePatterns: ["docusaurus.config.js", "*.cjs"],
env: {
es2020: true,
node: true,
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/check-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,5 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build AntStack
run: pnpm build --filter="ant-stack"

- name: Run TypeScript type checking
run: pnpm ci:tsc
47 changes: 7 additions & 40 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,11 @@ jobs:
# Ensure NODE_ENV != production so pnpm will install devDependencies!!!
run: NODE_ENV=development pnpm install --frozen-lockfile

- name: Build AntStack
run: pnpm build --filter="ant-stack"

- name: Link AntStack
run: pnpm link ant-stack

- name: Build API assets
run: pnpm build --filter="api-*"

- name: Wait for API CloudFormation stack to idle
uses: ./.github/actions/wait-for-cloudformation-stack-idle
with:
stack_name: peterportal-api-next-prod
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRETS_ACCESS_KEY }}
- name: Build API
run: pnpm build --filter="@apps/api"

- name: Deploy API CloudFormation stack
run: pnpm run deploy --filter="ant-stack"
run: pnpm --filter="@apps/api" cdk-app deploy

deploy-documentation:
name: Deploy documentation CloudFormation stack and production environment
Expand All @@ -89,18 +76,11 @@ jobs:
# Ensure NODE_ENV != production so pnpm will install devDependencies!!!
run: NODE_ENV=development pnpm install --frozen-lockfile

- name: Build documentation CDK
run: pnpm build --filter="docs-cdk"

- name: Wait for documentation CloudFormation stack to idle
uses: ./.github/actions/wait-for-cloudformation-stack-idle
with:
stack_name: peterportal-api-next-docs-prod
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRETS_ACCESS_KEY }}
- name: Build documentation
run: pnpm build --filter="@apps/docs"

- name: Deploy documentation CloudFormation stack
run: pnpm run deploy --filter="docs-cdk"
run: pnpm --filter="@tools/cdk" docs deploy

deploy-services:
name: Deploy services CloudFormation stack and production environment
Expand All @@ -121,21 +101,8 @@ jobs:
# Ensure NODE_ENV != production so pnpm will install devDependencies!!!
run: NODE_ENV=development pnpm install --frozen-lockfile

- name: Build AntStack
run: pnpm build --filter="ant-stack"

- name: Link AntStack
run: pnpm link ant-stack

- name: Build services
run: pnpm build --filter="@services/*"

- name: Wait for services CloudFormation stack to idle
uses: ./.github/actions/wait-for-cloudformation-stack-idle
with:
stack_name: peterportal-api-next-services-prod
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRETS_ACCESS_KEY }}

- name: Deploy stack
run: pnpm run deploy --filter="@services/*"
run: pnpm --filter="@tools/cdk" services deploy
32 changes: 6 additions & 26 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,11 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build AntStack
run: pnpm build --filter="ant-stack"

- name: Link AntStack
run: pnpm link ant-stack

- name: Build API assets
run: pnpm build --filter="api-*"

- name: Wait for API CloudFormation stack to stabilize
uses: ./.github/actions/wait-for-cloudformation-stack-idle
with:
stack_name: peterportal-api-next-staging-${{ github.event.pull_request.number }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRETS_ACCESS_KEY }}
- name: Build API
run: pnpm build --filter="@apps/api"

- name: Deploy API CloudFormation stack
run: pnpm run deploy --filter="ant-stack"
run: pnpm --filter="@apps/api" cdk-app deploy

deploy-documentation:
name: Deploy documentation CloudFormation stack and staging environment for pull request
Expand All @@ -92,15 +79,8 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build documentation CDK
run: pnpm build --filter="docs-cdk"

- name: Wait for documentation CloudFormation stack to idle
uses: ./.github/actions/wait-for-cloudformation-stack-idle
with:
stack_name: peterportal-api-next-docs-staging-${{ github.event.pull_request.number }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRETS_ACCESS_KEY }}
- name: Build documentation
run: pnpm build --filter="@apps/docs"

- name: Deploy documentation CloudFormation stack
run: pnpm run deploy --filter="docs-cdk"
run: pnpm --filter="@tools/cdk" docs deploy
33 changes: 6 additions & 27 deletions .github/workflows/destroy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,11 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build AntStack
run: pnpm build --filter="ant-stack"

- name: Link AntStack
run: pnpm link ant-stack

# Do not remove this step, as the API assets are required for `cdk destroy` to work properly.
- name: Build API assets
run: pnpm build --filter="api-*"

- name: Wait for API CloudFormation stack to idle
uses: ./.github/actions/wait-for-cloudformation-stack-idle
with:
stack_name: peterportal-api-next-staging-${{ github.event.pull_request.number }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRETS_ACCESS_KEY }}
- name: Build API
run: pnpm build --filter="@apps/api"

- name: Destroy API CloudFormation stack
run: pnpm destroy --filter="ant-stack"
run: pnpm --filter="@apps/api" cdk-app destroy

- name: Set API staging environment to inactive
uses: strumwolf/delete-deployment-environment@195215d2c5602aee6fb4b9cf0853970decca9e7a # v2.3.0
Expand All @@ -92,18 +78,11 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build documentation CDK
run: pnpm build --filter="docs-cdk"

- name: Wait for documentation CloudFormation stack to idle
uses: ./.github/actions/wait-for-cloudformation-stack-idle
with:
stack_name: peterportal-api-next-docs-staging-${{ github.event.pull_request.number }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRETS_ACCESS_KEY }}
- name: Build documentation
run: pnpm build --filter="@apps/docs"

- name: Destroy documentation CloudFormation stack
run: pnpm destroy --filter="docs-cdk"
run: pnpm --filter="@tools/cdk" docs destroy

- name: Set documentation staging environment as inactive
uses: strumwolf/delete-deployment-environment@195215d2c5602aee6fb4b9cf0853970decca9e7a # v2.3.0
Expand Down
3 changes: 0 additions & 3 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
enable-pre-post-scripts = true
shamefully-hoist = true
engine-strict = true
link-workspace-packages = true
ap0nia marked this conversation as resolved.
Show resolved Hide resolved
91 changes: 0 additions & 91 deletions ant.config.ts

This file was deleted.

6 changes: 6 additions & 0 deletions apps/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules

# Keep environment variables out of version control
.env

.bronya
Loading