Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: updater scripts #732

Closed
wants to merge 2,919 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2919 commits
Select commit Hold shift + click to select a range
ed0a056
remove old infra, rename new-infra directory
maxmwang Feb 18, 2024
3ee9350
remove old infra, rename new-infra directory (actually)
maxmwang Feb 18, 2024
1f8ddd3
remove helm build package
maxmwang Feb 18, 2024
ffc1e74
use --values values.yaml instead of inline --set
maxmwang Feb 18, 2024
e7546fa
add prod infra
kevinzwang Feb 20, 2024
c3b3581
reorder charts and change ingress to use issuer, not clusterissuer
kevinzwang Feb 20, 2024
125752c
Merge pull request #672 from asuc-octo/infra-kev
maxmwang Feb 22, 2024
1e7a73b
create cron job to spin up new pod
Chengming-Li Feb 22, 2024
afd0a58
finish updater.yaml
Chengming-Li Feb 22, 2024
a97989d
mongo bitnami chart
maxmwang Feb 23, 2024
8188637
fix implementation to allow for multiple commands
Chengming-Li Feb 23, 2024
ad2c0b3
add metallb and move base dependencies
kevinzwang Feb 23, 2024
2357342
fix default address range (oops used current bt ip)
kevinzwang Feb 23, 2024
cc21c20
move to letsencrypt prod
kevinzwang Feb 23, 2024
310904c
add common labels to metallb configs
kevinzwang Feb 23, 2024
6b990b8
formatting
maxmwang Feb 27, 2024
df994f7
use bitnami mongodb chart
maxmwang Feb 27, 2024
2320044
add collections name to mongo models
maxmwang Feb 27, 2024
16fb4f9
add collections name to mongo models
maxmwang Feb 27, 2024
9b5e95d
use existingClaim as pvc name
maxmwang Feb 28, 2024
133a9ca
merge infra in
maxmwang Feb 28, 2024
a75e03f
Merge pull request #680 from asuc-octo/infra-mongo
maxmwang Feb 28, 2024
02b46c6
feat: localhost:3001
mathhulk Feb 29, 2024
87dc2a9
feat: localhost:3001
mathhulk Feb 29, 2024
3fc2749
express trust proxy (nginx)
maxmwang Feb 29, 2024
e07b62c
feat: Initialize AccountContext, Features images, etc.
mathhulk Feb 29, 2024
d5e1950
feat: Initialize AccountContext, Features images, etc.
mathhulk Feb 29, 2024
9d8b496
Merge pull request #682 from asuc-octo/gql-cors
maxmwang Feb 29, 2024
3889271
Merge pull request #682 from asuc-octo/gql-cors
maxmwang Feb 29, 2024
55b9b96
disable mongo auth, update helm commands
maxmwang Feb 29, 2024
7be5047
fix catalog query with course model change
maxmwang Feb 29, 2024
5577f2b
fix catalog query with course model change
maxmwang Feb 29, 2024
1212373
express trust proxy (nginx)
maxmwang Feb 29, 2024
76eb98c
express trust proxy (nginx)
maxmwang Feb 29, 2024
6490dd1
clean up root
maxmwang Feb 29, 2024
eaf4312
clean up root
maxmwang Feb 29, 2024
a6db9bc
Merge branch 'gql-proxy-auth' into gql
maxmwang Feb 29, 2024
f657db8
Merge branch 'gql-proxy-auth' into gql
maxmwang Feb 29, 2024
1040a16
feat: Class
mathhulk Mar 3, 2024
c1d4cdd
feat: Class
mathhulk Mar 3, 2024
02a26a3
feat: Filtering
mathhulk Mar 3, 2024
cb78b1c
feat: Filtering
mathhulk Mar 3, 2024
59f8e00
feat: Empty placeholder, mock Calendar
mathhulk Mar 3, 2024
5d070ee
feat: Empty placeholder, mock Calendar
mathhulk Mar 3, 2024
c099703
feat: Tooltips, Saturday + Sunday
mathhulk Mar 4, 2024
9b608d6
feat: Tooltips, Saturday + Sunday
mathhulk Mar 4, 2024
d6959a2
added local minio s3 and backup:mongodb script (#649)
ARtheboss Mar 6, 2024
bc514c0
added local minio s3 and backup:mongodb script (#649)
ARtheboss Mar 6, 2024
11ca8c1
feat: Init Schedule
mathhulk Mar 15, 2024
e344bad
feat: Init Schedule
mathhulk Mar 15, 2024
45276e1
feat: Init events
mathhulk Mar 15, 2024
6fce84e
feat: Init events
mathhulk Mar 15, 2024
496e023
feat: Init dynamic calendar
mathhulk Mar 15, 2024
00f9598
feat: Init dynamic calendar
mathhulk Mar 15, 2024
37ef084
Update controller.ts
mathhulk Mar 17, 2024
1ba33c2
Update controller.ts
mathhulk Mar 17, 2024
233a83c
Revert "added local minio s3 and backup:mongodb script (#649)"
maxmwang Mar 17, 2024
1f3829c
Revert "added local minio s3 and backup:mongodb script (#649)"
maxmwang Mar 17, 2024
ce0413c
Merge pull request #692 from asuc-octo/revert-649-mongodb-backup
maxmwang Mar 17, 2024
5ed4ccc
Merge pull request #692 from asuc-octo/revert-649-mongodb-backup
maxmwang Mar 17, 2024
eff6276
Merge branch 'gql' into mathhulk-patch-1
maxmwang Mar 17, 2024
ee9084c
Merge branch 'gql' into mathhulk-patch-1
maxmwang Mar 17, 2024
c27889e
feat: Itinerary
mathhulk Mar 18, 2024
24da12e
feat: Itinerary
mathhulk Mar 18, 2024
2150698
feat: Buildings
mathhulk Mar 19, 2024
6564e75
feat: Buildings
mathhulk Mar 19, 2024
fcb7760
feat: campus.geojson
mathhulk Mar 19, 2024
d66d418
feat: campus.geojson
mathhulk Mar 19, 2024
e0e667a
feat: Init map markers, look into directions
mathhulk Mar 21, 2024
b15fda9
feat: Init map markers, look into directions
mathhulk Mar 21, 2024
610d424
add CI/CD workflows
Chengming-Li Mar 25, 2024
eef9cbb
Change ssh method
Chengming-Li Mar 25, 2024
372fda4
added resiliency against variance between updated and updatedAt
Apr 5, 2024
4269b7e
added resiliency against variance between updated and updatedAt
Apr 5, 2024
cd3541f
Merge pull request #704 from asuc-octo/gql-updated/updatedat-fix
maxmwang Apr 10, 2024
f334238
Merge pull request #704 from asuc-octo/gql-updated/updatedat-fix
maxmwang Apr 10, 2024
f01d768
update github actions from old repo configs
maxmwang Apr 10, 2024
643ff8b
update github actions from old repo configs
maxmwang Apr 10, 2024
f11c1a1
fix github actions
maxmwang Apr 10, 2024
2b11afa
fix github actions
maxmwang Apr 10, 2024
c1942ed
introspection on stanfurdtime
maxmwang Apr 11, 2024
fc6f749
express trust proxy (nginx) (rebase with gql)
maxmwang Apr 11, 2024
dd98f7d
allow introspection on stanfurdtime
maxmwang Apr 11, 2024
b1ceba7
allow introspection on stanfurdtime
maxmwang Apr 11, 2024
a23e74e
TODO(production) flag
maxmwang Apr 11, 2024
492759b
TODO(production) flag
maxmwang Apr 11, 2024
2dcb810
TODO(production) flag
maxmwang Apr 11, 2024
363a02b
TODO(production) flag
maxmwang Apr 11, 2024
e77c8c4
Merge pull request #691 from asuc-octo/mathhulk-patch-1
maxmwang Apr 11, 2024
78b8cb2
Merge pull request #691 from asuc-octo/mathhulk-patch-1
maxmwang Apr 11, 2024
a933adf
feat: Location, Time, Details, CCN, Tooltip; sections, etc.
mathhulk Apr 13, 2024
7c2f065
feat: Location, Time, Details, CCN, Tooltip; sections, etc.
mathhulk Apr 13, 2024
9f5cb2d
feat: Dark theme, search for and add classes to a schedule, etc.
mathhulk Apr 13, 2024
698f9f2
feat: Dark theme, search for and add classes to a schedule, etc.
mathhulk Apr 13, 2024
5f51ac2
feat: Plan, responsive Browser, responsive Catalog, responsive Calendar
mathhulk Apr 15, 2024
5d6571d
feat: Plan, responsive Browser, responsive Catalog, responsive Calendar
mathhulk Apr 15, 2024
1ae88cd
add caching to apollo queries
kevinzwang Apr 15, 2024
cc05d01
add caching to apollo queries
kevinzwang Apr 15, 2024
8727662
feat: Units, responsive Details, etc.
mathhulk Apr 15, 2024
9c693d4
feat: Units, responsive Details, etc.
mathhulk Apr 15, 2024
a9c289a
feat: Support old terms, move filtering to Browser, Dockerfile, etc.
mathhulk Apr 16, 2024
adaafdf
feat: Support old terms, move filtering to Browser, Dockerfile, etc.
mathhulk Apr 16, 2024
bcd9ede
Merge branch 'gql' into frontend-rewrite
mathhulk Apr 16, 2024
4d3a949
Merge branch 'gql' into frontend-rewrite
mathhulk Apr 16, 2024
b72dacf
remove extranneous cacheControl directive
kevinzwang Apr 17, 2024
a7a95a4
remove extranneous cacheControl directive
kevinzwang Apr 17, 2024
3d5c2a7
Merge pull request #705 from asuc-octo/gql-apollo-caching
maxmwang Apr 17, 2024
1145edd
Merge pull request #705 from asuc-octo/gql-apollo-caching
maxmwang Apr 17, 2024
6f891fe
feat: Init plan
mathhulk Apr 17, 2024
2722976
feat: Init plan
mathhulk Apr 17, 2024
3a41c7e
Merge branch 'gql' into frontend-rewrite
mathhulk Apr 17, 2024
8dc978f
Merge branch 'gql' into frontend-rewrite
mathhulk Apr 17, 2024
ce16be2
feat: Search
mathhulk Apr 19, 2024
060fadc
feat: Search
mathhulk Apr 19, 2024
2e660cf
fixes for course/catalog: added sections list, list type corrections,…
Apr 17, 2024
3e3f1fb
fixes for course/catalog: added sections list, list type corrections,…
Apr 17, 2024
7a81c36
feat: Search
mathhulk Apr 20, 2024
9fe9d61
feat: Search
mathhulk Apr 20, 2024
12530e2
feat: section
mathhulk Apr 21, 2024
3658f58
feat: section
mathhulk Apr 21, 2024
4b1da35
feat: Preview sections, Itinerary
mathhulk Apr 22, 2024
2984b78
feat: Preview sections, Itinerary
mathhulk Apr 22, 2024
110c962
feat: Track markers
mathhulk Apr 22, 2024
b768c75
feat: Track markers
mathhulk Apr 22, 2024
b221fc0
feat: usePrefersColorScheme
mathhulk Apr 24, 2024
eac8a91
feat: usePrefersColorScheme
mathhulk Apr 24, 2024
647c706
feat: anyPrintInScheduleOfClasses
mathhulk Apr 24, 2024
6cd572b
feat: anyPrintInScheduleOfClasses
mathhulk Apr 24, 2024
dcd6a49
fix: types
mathhulk Apr 24, 2024
8922e76
fix: types
mathhulk Apr 24, 2024
da0f861
frontend start
maxmwang Apr 24, 2024
297755c
fix: start
mathhulk Apr 24, 2024
f5890cd
fix: start
mathhulk Apr 24, 2024
e55ea83
fix: dist
mathhulk Apr 24, 2024
e4118a6
fix: dist
mathhulk Apr 24, 2024
7bc1fff
chore: gitignore
mathhulk Apr 24, 2024
d6ddbbc
chore: gitignore
mathhulk Apr 24, 2024
d1968a9
fix: uri
mathhulk Apr 24, 2024
0d5ccf4
fix: uri
mathhulk Apr 24, 2024
ed8020d
feat: Filters
mathhulk Apr 25, 2024
3f63ced
feat: Filters
mathhulk Apr 25, 2024
4297d42
feat: Sorting
mathhulk Apr 28, 2024
8339052
feat: Sorting
mathhulk Apr 28, 2024
1a54ba5
feat: Reserved seats
mathhulk Apr 29, 2024
723d0cb
feat: Reserved seats
mathhulk Apr 29, 2024
8be7703
feat: In-progress migration to expanded data formats
mathhulk May 6, 2024
d1591ad
feat: In-progress migration to expanded data formats
mathhulk May 6, 2024
5f34a05
feat: Enrollment, Grades
mathhulk May 7, 2024
ba0a5d9
feat: Enrollment, Grades
mathhulk May 7, 2024
f701d01
feat: Filtering
mathhulk Jun 2, 2024
e97c2f0
feat: Filtering
mathhulk Jun 2, 2024
41ed7e6
feat: Schedule, Calendar
mathhulk Jun 7, 2024
b31bfae
feat: Schedule, Calendar
mathhulk Jun 7, 2024
eee78be
feat: Compare
mathhulk Jun 8, 2024
d9ed10a
feat: Compare
mathhulk Jun 8, 2024
6af982a
feat: Manage
mathhulk Jun 9, 2024
d781078
feat: Manage
mathhulk Jun 9, 2024
756b343
feat: Schedule context (units, classes, term)
mathhulk Jun 9, 2024
5dde3f6
feat: Schedule context (units, classes, term)
mathhulk Jun 9, 2024
bc02bf4
feat: Capacity color
mathhulk Jun 9, 2024
e66da6b
feat: Capacity color
mathhulk Jun 9, 2024
b35bdcb
feat: Tooltip
mathhulk Jun 10, 2024
a9d95e2
feat: Tooltip
mathhulk Jun 10, 2024
81e9329
feat: Filter by day
mathhulk Jun 12, 2024
3ceebd8
feat: Filter by day
mathhulk Jun 12, 2024
0ba28db
fix: add placeholder value for refresh_token
maxmwang Jun 16, 2024
ef5a8ad
fix: add placeholder value for refresh_token
maxmwang Jun 16, 2024
a3dc2c6
revert
maxmwang Jun 16, 2024
7a40c8b
revert
maxmwang Jun 16, 2024
94272eb
fix user auth
maxmwang Jun 16, 2024
6671a98
fix user auth
maxmwang Jun 16, 2024
3b5ee90
fix user auth
maxmwang Jun 16, 2024
5ed2234
Merge branch 'gql' into frontend-rewrite
mathhulk Jun 16, 2024
ccf9ad8
Merge branch 'gql' into frontend-rewrite
mathhulk Jun 16, 2024
56c7676
feat: Log in and log out with redirectURI via base64-encoded state
mathhulk Jun 16, 2024
2528543
feat: Log in and log out with redirectURI via base64-encoded state
mathhulk Jun 16, 2024
5e5c905
feat: Init schedules
mathhulk Jun 16, 2024
c138ae5
feat: Init schedules
mathhulk Jun 16, 2024
271469a
feat: Optional query persistence for Browser, internal Browser API fe…
mathhulk Jun 18, 2024
3b88ea9
feat: Optional query persistence for Browser, internal Browser API fe…
mathhulk Jun 18, 2024
bdef01a
feat: use redis for user session cookies (#710)
maxmwang Jun 24, 2024
7e730ef
feat: use redis for user session cookies (#710)
maxmwang Jun 24, 2024
735aaf4
feat: Winter, GZIP compression, getCourseList
mathhulk Jun 24, 2024
75706de
feat: Winter, GZIP compression, getCourseList
mathhulk Jun 24, 2024
e9686ba
feat: Terms
mathhulk Jun 24, 2024
81ea9ef
feat: Terms
mathhulk Jun 24, 2024
4856881
fix: scraping
mathhulk Jun 24, 2024
8617d67
fix: scraping
mathhulk Jun 24, 2024
1d571a2
feat: node:slim
mathhulk Jun 24, 2024
15e22e8
feat: node:slim
mathhulk Jun 24, 2024
419ed5b
Merge branch 'gql' into frontend-rewrite
mathhulk Jun 24, 2024
121a7fa
Merge branch 'gql' into frontend-rewrite
mathhulk Jun 24, 2024
1e6b3f0
Merge pull request #711 from asuc-octo/frontend-rewrite
mathhulk Jun 25, 2024
6b54422
Merge pull request #711 from asuc-octo/frontend-rewrite
mathhulk Jun 25, 2024
d6ba4bb
Merge branch 'gql' into term-scrape
mathhulk Jun 25, 2024
b42e9fd
Merge branch 'gql' into term-scrape
mathhulk Jun 25, 2024
c836081
chore: Lint, Typescript, etc.
mathhulk Jun 25, 2024
e21dc38
chore: Lint, Typescript, etc.
mathhulk Jun 25, 2024
48acfe9
fix: Allow frontend to build
mathhulk Jun 25, 2024
d9f8d69
feat: Map
mathhulk Jun 26, 2024
368bb3f
feat: Map
mathhulk Jun 26, 2024
5abe282
Merge remote-tracking branch 'refs/remotes/origin/frontend-rewrite' i…
mathhulk Jun 27, 2024
89660be
feat: Display classes rather than grouped courses
mathhulk Jun 30, 2024
347fe59
feat: Port fuzzy matching to worker (future), limit queries to 24 cha…
mathhulk Jul 1, 2024
ef79ffb
feat: Open and online
mathhulk Jul 1, 2024
cd571b8
Merge remote-tracking branch 'refs/remotes/origin/term-scrape' into t…
mathhulk Jul 1, 2024
22454be
Merge branch 'frontend-rewrite' into term-scrape
mathhulk Jul 1, 2024
b86db27
feat: InstructionMethod, ClassBrowser, CourseBrowser
mathhulk Jul 2, 2024
73a4111
fix: CourseBrowser, ClassBrowser
mathhulk Jul 2, 2024
c8569ee
feat: Generated types
mathhulk Jul 2, 2024
0575add
feat: CourseBrowser defaultSemesters
mathhulk Jul 3, 2024
ef62209
feat: User context for schedules
mathhulk Jul 3, 2024
48b05ae
feat: Polymorphic components, prepare for dashboard, play around with…
mathhulk Jul 10, 2024
a033bc0
feat: Responsive catalog with dashboard
mathhulk Jul 12, 2024
e1d99e3
feat: Search
mathhulk Jul 12, 2024
6fb2209
feat: Course, Class, CourseDrawer, ClassDrawer
mathhulk Jul 15, 2024
d4ec13b
fix: CourseDrawer, ClassDrawer
mathhulk Jul 15, 2024
fa04f11
Formatter scripts for CalAnswers grade data + new grade data (WIP) (#…
KartavyaSharma Jul 22, 2024
00631d0
boilerplater
maxmwang Jul 25, 2024
4906319
Merge branch 'term-scrape' into datapuller
mathhulk Jul 25, 2024
139bc0f
feat: Init turbo
mathhulk Jul 25, 2024
1800ca6
fix: Lint and build
mathhulk Jul 26, 2024
b27736a
fix: Lint and build
mathhulk Jul 26, 2024
cfc43bd
fix: Lint, generate types, and build
mathhulk Jul 26, 2024
3d98b4b
feat: Do not track generated types
mathhulk Jul 26, 2024
f32abb7
feat: Dockerfile
mathhulk Aug 6, 2024
dc04fee
new infra (#715)
maxmwang Aug 13, 2024
6a5beb1
rever mongodb port expose
maxmwang Aug 13, 2024
c67806c
feat: Automatically generate API clients from Swagger
mathhulk Aug 13, 2024
ffa5f74
fix: No await needed
mathhulk Aug 13, 2024
d577630
feat: --env-mode=loose
mathhulk Sep 5, 2024
a9a1508
feat: Add package-lock.json
mathhulk Sep 10, 2024
a7f3b91
fix: Remove polymorphic MenuItem
mathhulk Sep 10, 2024
bbb7e67
feat: Dockerfile
mathhulk Sep 25, 2024
1a8fca1
Merge branch 'gql' into datapuller
mathhulk Sep 25, 2024
10f2926
Merge pull request #714 from asuc-octo/datapuller
mathhulk Sep 25, 2024
97614b1
feat: Theme
mathhulk Sep 25, 2024
dec66d9
feat: Polymorphism, data attributes, remove custom props
mathhulk Sep 25, 2024
9764692
feat: Separate light and dark color tokens
mathhulk Sep 25, 2024
28c2ebf
chore: Remove unnecessary files
mathhulk Sep 26, 2024
39ec2e7
feat: exec format, COPY built files
mathhulk Sep 26, 2024
0e452de
fix: update-catalog
mathhulk Sep 30, 2024
bda60a9
fix: update-catalog
mathhulk Sep 30, 2024
8c50182
add docker config for datapuller
adit-bala Oct 1, 2024
7324061
Merge pull request #724 from asuc-octo/datapuller-docker-config
adit-bala Oct 1, 2024
054d501
feat: Add in data for 8 most recent terms
mathhulk Oct 1, 2024
7c35d12
chore: Revert catalog to before
mathhulk Oct 2, 2024
e604dd8
feat: Init terms
mathhulk Oct 5, 2024
eac3cb4
fix: Add L code for final exams
mathhulk Oct 5, 2024
90145f5
base section script
adit-bala Oct 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
npm-debug.log
db
34 changes: 18 additions & 16 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# ".env.template" is not actually used anywhere. It is just to show the format of an appropriate environment file
DATABASE_URL=postgres://<username>:<password>@<hostname>:5432/bt
DJANGO_SECRET_KEY=
ENVIRONMENT_NAME=localhost
GOOGLE_APPLICATION_CREDENTIALS_FILE_CONTENTS_BASE64=
GOOGLE_APPLICATION_CREDENTIALS_FILEPATH=/auth.json
GOOGLE_SIGNIN_CLIENT_SECRET_CONTENTS_BASE64=
GOOGLE_SIGNIN_CLIENT_SECRET_FILEPATH=/signin.json
GOOGLE_EMAIL=
GOOGLE_PASS=
GITHUB_TOKEN=
REDIS_URL=redis://<username>:<password>@<hostname>:6379
SIS_CLASS_APP_ID=
SIS_CLASS_APP_KEY=
SIS_COURSE_APP_ID=
SIS_COURSE_APP_KEY=
PORT=5001
URL=http://localhost:5001
BACKEND_PATH=/api
GRAPHQL_PATH=/graphql
NODE_ENV=development
MONGODB_URI=mongodb://mongodb:27017/bt
REDIS_URI=redis://redis:6379

SIS_CLASS_APP_ID=_
SIS_CLASS_APP_KEY=_
SIS_COURSE_APP_ID=_
SIS_COURSE_APP_KEY=_
SIS_TERM_APP_ID=_
SIS_TERM_APP_KEY=_

GOOGLE_CLIENT_ID=_
GOOGLE_CLIENT_SECRET=_
SESSION_SECRET=_
35 changes: 35 additions & 0 deletions .github/workflows/cd-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name:
Deploy to Dev

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh -i ~/.ssh/id_rsa [email protected] << EOF
cd /berkeleytime
git checkout ${{ github.event.pull_request.head.sha }}
git pull
docker compose up --build -d
docker tag berkeleytime-backend octoberkeleytime/bt-backend:${{ github.event.pull_request.head.sha }}
docker tag berkeleytime-frontend octoberkeleytime/bt-frontend:${{ github.event.pull_request.head.sha }}
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker push octoberkeleytime/bt-backend:${{ github.event.pull_request.head.sha }}
docker push octoberkeleytime/bt-frontend:${{ github.event.pull_request.head.sha }}
helm install bt-dev-app ./app --namespace=bt \
--set host=${{ github.event.pull_request.head.sha }}.stanfurdtime.com \
--set mongoUri=mongodb://bt-dev-mongo-mongodb.bt.svc.cluster.local:27017/bt \
--set redisUri=redis://bt-dev-redis-master.bt.svc.cluster.local:6379 \
--set nodeEnv=development \
--set frontend.image.tag=${{ github.event.pull_request.head.sha }} \
--set backend.image.tag=${{ github.event.pull_request.head.sha }}
EOF
30 changes: 30 additions & 0 deletions .github/workflows/cd-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name:
Deploy to Staging

on:
push:
branches: [ master ]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh -i ~/.ssh/id_rsa [email protected] << EOF
cd /berkeleytime
git checkout master
git pull
docker compose up --build -d
docker tag berkeleytime-backend octoberkeleytime/bt-backend:latest
docker tag berkeleytime-frontend octoberkeleytime/bt-frontend:latest
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker push octoberkeleytime/bt-backend:latest
docker push octoberkeleytime/bt-frontend:latest
kubectl rollout restart deployment bt-staging-app-backend
kubectl rollout restart deployment bt-staging-app-frontend
EOF
34 changes: 34 additions & 0 deletions .github/workflows/gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Codegen Test

on:
push:
pull_request:

jobs:
Codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: install latest node version
uses: actions/setup-node@v4
with:
node-version: latest

- name: npm install and gen
working-directory: ./backend
run: |
npm install
npm run generate

- name: test diff
uses: tj-actions/verify-changed-files@v14
id: test-diff
with:
files: |
./backend/**/generated-types/*.ts

- if: steps.test-diff.outputs.files_changed == 'true'
run: |
echo "Run 'npm run generate' to fix!"
exit 1
41 changes: 41 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Lint

on:
workflow_dispatch:
push:
branches: ["main", "gql"]
pull_request:
branches: ["main", "gql"]

jobs:
build:
name: Lint and Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# setup nodejs
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: latest

# cache node_modules
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

- name: Lint
run: npx turbo run lint

- name: Build
run: npx turbo run build
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ build/requirements.txt
postgres-data.tar.gz
bt_main.sql
/.vscode
package-lock.json
node_modules/
build/docker-compose.yml
config.statuspage.json
*.cert
*.key
dist/
db/
mdb.archive
bt_seed.sql
bt_seed.sql.gz
.turbo
generated-types/
96 changes: 0 additions & 96 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
auto-install-peers = true
engine-strict = true
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
default_install_hook_types: [pre-push]
repos:
- repo: local
hooks:
- id: format
name: format
entry: npx prettier --write
language: system
files: \.(ts|tsx)$
stages: [pre-push]
- id: build
name: build
entry: npm run build
language: system
stages: [pre-push]
pass_filenames: false
30 changes: 30 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"singleAttributePerLine": false,
"bracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"importOrder": [
"^react$",
"<THIRD_PARTY_MODULES>",
"^@repo/(.*)$",
"^@/(.*)$",
"^[../]",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
Loading
Loading