Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
9666de0
init custom select group
Jdyn Mar 30, 2023
dabf1c6
handle grouped menu lists
Jdyn Mar 31, 2023
5dd5e99
small refactors
Jdyn Apr 4, 2023
e398429
expand abbreviation variations
Jdyn Apr 4, 2023
1895fc0
implement url-based querying
Jdyn Apr 4, 2023
f9ad9a7
Fix class card text cutoff
QxBytes Apr 6, 2023
4ae1f35
add .gitlab-ci.yml that was added a year ago
hi-usui Apr 9, 2023
e2d5e99
add QUOTES_API_KEY
hi-usui Apr 9, 2023
4a0fee2
Fix react tooltip syntax
QxBytes Apr 9, 2023
f43fba0
Fix react tooltip for empty graph
QxBytes Apr 9, 2023
3c61104
Merge pull request #579 from asuc-octo/fix-tooltip
mathhulk Apr 13, 2023
3a4f1d5
Merge pull request #581 from asuc-octo/fix-overflow-class-card
mathhulk Apr 13, 2023
28bb4e4
init dynamic metadata
Jdyn Apr 16, 2023
8a22469
Merge branch 'master' into search
Jdyn Apr 16, 2023
a43ba59
Drastically improve search query speed
Jdyn Apr 17, 2023
8770302
require searchQuery
Jdyn Apr 17, 2023
24376a0
Fix fuse options on select-search
Jdyn Apr 17, 2023
74f4bee
add full course search index to select-search
Jdyn Apr 19, 2023
edd630c
increase threshold and fix regex
Jdyn Apr 20, 2023
dedeb7f
rework select search entirely
Jdyn Apr 20, 2023
bd47105
don't ignore search location
Jdyn Apr 20, 2023
3233a72
disable custom search for other selects
Jdyn Apr 20, 2023
e7995c9
dropdown placement changes
Jdyn Apr 20, 2023
85af94f
move laymanTerms
Jdyn Apr 22, 2023
097e64d
add sort by ascending and descending + improve abbreviation search
Jdyn Apr 22, 2023
1c56ccd
add "data" abbreviation
Jdyn Apr 22, 2023
32bef95
Update tooltip text to be more descriptive
QxBytes Apr 25, 2023
4928884
revert building course index
Jdyn May 3, 2023
aebac2f
move unknown sorted elements to the bottom of sort
Jdyn May 3, 2023
eaf465e
clean up descending sort fn
Jdyn May 3, 2023
2edd2e0
Merge pull request #575 from asuc-octo/search
mathhulk May 21, 2023
cdb556d
rephrase tooltip text
zacharyzollman Jun 3, 2023
8112bb2
Add fa23 application banner and link
kevinzwang Aug 23, 2023
5f18ef6
Change python image to debian bullseye
kevinzwang Aug 23, 2023
d3be561
Merge pull request #586 from asuc-octo/fa23recruitment
kevinzwang Aug 23, 2023
a220824
Change /apply to not be case sensitive for flyer
kevinzwang Aug 24, 2023
2b18e2f
Merge pull request #588 from asuc-octo/fa23recruitment
kevinzwang Aug 24, 2023
7bb7e5c
fix invalid ical date generation
Jdyn Aug 26, 2023
0c1a921
Merge pull request #589 from asuc-octo/export-schedule-date-bug
mathhulk Aug 27, 2023
bdef3ff
refactor to react-router v6
mathhulk Sep 3, 2023
b4018e5
Refactor class components to function components; Enrollment is curre…
mathhulk Sep 4, 2023
668d10f
localSelectPrimary and localSelectSecondary for disabled button
mathhulk Sep 4, 2023
787574f
Fix EnrollmentGraphCard update conditional
mathhulk Sep 4, 2023
135a8e9
Merge pull request #578 from asuc-octo/quotes
kevinzwang Sep 12, 2023
f3fdc52
Merge pull request #583 from asuc-octo/update-tooltip
mathhulk Sep 12, 2023
aeee141
Add localhost:3000 to cors
maxmwang Sep 22, 2023
a797069
Install django-cors-headers, place middleware first, allow all origins
mathhulk Sep 22, 2023
5e6905f
Downgrade Cors version
maxmwang Sep 22, 2023
29d1145
Fix
maxmwang Sep 22, 2023
78c63d8
Fix regex
maxmwang Sep 22, 2023
0f58794
Regex fix hopefully
maxmwang Sep 22, 2023
8c65ec9
Typo
maxmwang Sep 22, 2023
1a3a4e8
Remove line
maxmwang Sep 22, 2023
be92915
Merge pull request #611 from asuc-octo/cors
kevinzwang Sep 22, 2023
005d53e
use staging backend in dev
Jdyn Sep 23, 2023
6c10fdc
Merge branch 'master' into dynamic-metadata
Jdyn Sep 23, 2023
62985dc
fix stale import
Jdyn Sep 23, 2023
cceedad
add description meta
Jdyn Sep 23, 2023
77dcd4a
reduce nested structure of router definition
Jdyn Sep 24, 2023
9c20eeb
Merge branch 'master' into chore/function-components
mathhulk Sep 24, 2023
d52fe6c
Merge pull request #612 from asuc-octo/dev-urls
mathhulk Sep 24, 2023
d1ab8bf
Merge branch 'master' into chore/function-components
mathhulk Sep 24, 2023
434901d
Merge branch 'master' into chore/update-react-router
mathhulk Sep 24, 2023
698e29c
use fallbackElement?
Jdyn Sep 24, 2023
6e69428
Merge branch 'chore/update-react-router' into chore/function-components
mathhulk Sep 24, 2023
ec44f44
Merge pull request #613 from asuc-octo/chore/function-components
mathhulk Sep 24, 2023
b5b9081
Open browser automatically, convert final components to function comp…
mathhulk Sep 24, 2023
5726860
Add back polling (only for `make up`, should check env in future)
mathhulk Sep 24, 2023
dcf5388
Remove fallbackElement since it didn't work; hope for the best
mathhulk Sep 24, 2023
1d48874
Merge pull request #614 from asuc-octo/no-classes
mathhulk Sep 26, 2023
33b611b
Remove application banner and redirect
xyntechx Oct 3, 2023
6892bb6
Remove application banner and redirect
xyntechx Oct 3, 2023
04a4eef
Merge branch 'remove-banner-redirect-610' of https://github.com/asuc-…
xyntechx Oct 3, 2023
17b77ae
Add loading state icon for lazy loaded components
kara4600 Oct 3, 2023
42ae350
Update general.py
JackyJerkyYt Oct 3, 2023
e0906ae
change the settings.py to spring2024
JackyJerkyYt Oct 3, 2023
35b1db4
Merge pull request #627 from asuc-octo/remove-banner-redirect-610
xyntechx Oct 7, 2023
c6ec3f7
add spring 2024 semester dates, need double check
JackyJerkyYt Oct 9, 2023
1140b1c
correct the general.py mistakes
JackyJerkyYt Oct 9, 2023
0190d93
fix mistakes in the spring2024.py
JackyJerkyYt Oct 9, 2023
aaec0c7
update dates for schedule export for frontend
JackyJerkyYt Oct 9, 2023
1159137
don't see any point of having the final date if we don't use them. Ac…
JackyJerkyYt Oct 9, 2023
8984334
fixed the phase start year mistake
JackyJerkyYt Oct 9, 2023
64e085c
fix the wrong date for the phase 1 and 2 start date, now the date is …
JackyJerkyYt Oct 10, 2023
84ac38a
added the final as dummy file
JackyJerkyYt Oct 10, 2023
73e9a84
changes back the date for the python file
JackyJerkyYt Oct 10, 2023
83acd77
chnages the month to zero index in the js file
JackyJerkyYt Oct 10, 2023
8056e81
Merge pull request #631 from asuc-octo/jacky-update-django-spring24
JackyJerkyYt Oct 10, 2023
fbb7edb
Remove unused import
mathhulk Oct 17, 2023
7ed399a
Merge pull request #628 from asuc-octo/lazy-loading-loading-icon
mathhulk Oct 17, 2023
96b167d
Fix SIS course API URL
kevinzwang Oct 22, 2023
0ac3a70
Update spring2024.py
kevinzwang Oct 24, 2023
69c04bf
Label axes of Enrollment and Grades
xyntechx Oct 29, 2023
7251f67
Remove section name from tooltip for clarity
xyntechx Oct 29, 2023
8538339
Update Enrollment side context when hovering near a line
xyntechx Oct 31, 2023
06af32d
Merge pull request #643 from asuc-octo/improve-enrollment-grades
xyntechx Nov 7, 2023
5a6af4a
Merge branch 'master' into dynamic-metadata
Jdyn Nov 7, 2023
c9a8f9c
Merge pull request #582 from asuc-octo/dynamic-metadata
mathhulk Nov 7, 2023
3b7c6ce
Enable autofill for enrollment and grades
xyntechx Nov 28, 2023
3c10043
Merge pull request #659 from asuc-octo/auto-fill-course-fc
xyntechx Dec 1, 2023
c022208
add browser title data for enrollment and grades (#663)
Dec 6, 2023
5ad8688
feat: Recruitment (#666)
mathhulk Jan 17, 2024
2e6fea6
chore: remove recruitment banner and redirect
maxmwang Jan 26, 2024
c636f05
Merge pull request #667 from asuc-octo/chore/remove-recruitment
mathhulk Jan 30, 2024
f65b8ff
added data from spring 2023 to fall 2023
Feb 21, 2024
ed2143d
Merge pull request #670 from asuc-octo/new-grades-data
maxmwang Feb 21, 2024
84c2d3e
updated frontend majors list
Feb 23, 2024
9642153
update for fall2024 data
maxmwang Apr 3, 2024
8a2886d
Merge pull request #697 from asuc-octo/fall2024
maxmwang Apr 4, 2024
17e2bcb
Merge pull request #674 from asuc-octo/updated-majors
maxmwang Apr 24, 2024
fe38171
grades FERPA compliance (#708)
maxmwang Jun 14, 2024
50e260f
Update ingress-nginx.yaml (#709)
hi-usui Jun 14, 2024
6bebff3
force resolve relative path
mathhulk Jun 14, 2024
afcd99a
alias src
mathhulk Jun 14, 2024
42c28d1
force resolve all paths
mathhulk Jun 14, 2024
e264e86
force resolve root path
mathhulk Jun 14, 2024
e887407
force resolve graphql
mathhulk Jun 15, 2024
8ad7dac
fix typo
maxmwang Jun 15, 2024
df7ebde
more precise filtering
maxmwang Jun 15, 2024
ae4258a
more precise filtering
maxmwang Jun 15, 2024
829e5a5
more precise filtering, finally
maxmwang Jun 15, 2024
c1227e7
final filter
maxmwang Jun 15, 2024
e02fd74
simplify grades filter (equivalent)
maxmwang Jun 16, 2024
d932e4d
update inspirational quotes and Discord notifier to current state fro…
hi-usui Jun 23, 2024
e5a7d5b
fix: clean up
mathhulk Jun 27, 2024
c42423d
chore: Jump
mathhulk Jun 27, 2024
8430fc6
add github action to default branch
maxmwang Aug 15, 2024
fda382f
rename workflow
maxmwang Aug 16, 2024
faf96ab
add prod workflow to default branch
maxmwang Aug 16, 2024
b0e7dbf
fix job
maxmwang Aug 16, 2024
aa4059d
Fall 2024 recruitment (#719)
mathhulk Sep 3, 2024
38f8a0a
Revert "Fall 2024 recruitment (#719)"
maxmwang Sep 3, 2024
2d65c93
Fall 24 recruitment banner (#720)
maxmwang Sep 3, 2024
f4e2449
update banner link
maxmwang Sep 3, 2024
800b033
add misc recruitment links (#721)
maxmwang Sep 3, 2024
21acd8e
fix typo
maxmwang Sep 3, 2024
716c9a4
remove fa24 recruitment banner and links
maxmwang Sep 16, 2024
8ac4049
fix Google Cloud Storage prefix (#716)
hi-usui Sep 19, 2024
b9cd2ae
Update contributors.ts (#722)
hi-usui Sep 19, 2024
b2ff06a
feat: Crowd-sourced data survey
mathhulk Oct 5, 2024
b20a956
Update for spring2025 data (#725)
maxmwang Oct 14, 2024
877ec3b
fix spring2025 (#727)
maxmwang Oct 14, 2024
048ec41
fix spring2025 (#728)
maxmwang Oct 14, 2024
1d2d946
fix grades dropdown (#730)
maxmwang Oct 22, 2024
b493801
feat: Init
mathhulk Oct 22, 2024
6a8a636
feat: Placeholder
mathhulk Oct 23, 2024
b61e20f
Merge pull request #731 from asuc-octo/chore/fa-24
mathhulk Oct 23, 2024
912767d
feat: Image compression
mathhulk Oct 23, 2024
d6dab8c
feat: COMPRESS EVEN MORE
mathhulk Oct 24, 2024
b2fdca9
implement basic functionality
Chengming-Li Nov 18, 2024
3910668
add major req
Chengming-Li Nov 18, 2024
cb57216
add minor req option
Chengming-Li Nov 20, 2024
0fda94f
Merge branch 'gql' into gql-gradtrak
mathhulk Nov 22, 2024
9d22f72
add majors and minors to user
Chengming-Li Nov 29, 2024
d373050
Create Reset Dev Mongo for manual dispatch (gql-mongo-dev) (#750)
klhftco Dec 5, 2024
7e79366
Changes to gql-gradtrak (#749)
Chengming-Li Dec 7, 2024
22a7254
group photos, jacky & daniel (#751)
maxmwang Dec 14, 2024
4d08797
Revert "group photos, jacky & daniel (#751)" (#752)
maxmwang Dec 14, 2024
b446963
delete gql files (#753)
maxmwang Dec 14, 2024
2a9221a
Chore/fa 24 group photos (#754)
maxmwang Dec 14, 2024
d05f664
fix imports
maxmwang Dec 14, 2024
10bca06
change carousel order, fix landing
maxmwang Dec 14, 2024
4953fdb
change carousel order, fix daniel & aurelia photos
maxmwang Dec 15, 2024
5af41af
compress images
maxmwang Dec 15, 2024
bb76a2e
center start of sem photo
maxmwang Dec 15, 2024
120ca24
add missing alumni
maxmwang Dec 15, 2024
26e25c3
remove survey banner (#761)
maxmwang Jan 16, 2025
f85fc47
sp25 reruitment redirects and banner (#764)
maxmwang Jan 22, 2025
c712553
remove banner, remove links for sp25 recruitment
maxmwang Jan 31, 2025
9eb3051
rename github action
maxmwang Feb 1, 2025
d3e81fe
feat: placeholder
adit-bala Feb 21, 2025
86da461
Merge pull request #785 from asuc-octo/chore/template-master-helm-dif…
adit-bala Feb 21, 2025
14e694e
update readme
maxmwang Feb 22, 2025
cd63f72
feat: test on comment pr
adit-bala Feb 23, 2025
85ca7fb
chore: update step name
adit-bala Feb 23, 2025
3143079
Merge pull request #787 from asuc-octo/feat/helm-diff-master-pr-comme…
adit-bala Feb 23, 2025
5f9b810
feat: add back `workflow_dispatch` for manual testing
adit-bala Feb 23, 2025
383ee82
Merge pull request #788 from asuc-octo/feat/helm-diff-master-pr-comme…
adit-bala Feb 23, 2025
611c100
feat: proper helm diff job
adit-bala Feb 23, 2025
2f3700b
Merge pull request #789 from asuc-octo/feat/helm-diff-master-ver
adit-bala Feb 23, 2025
9b8e0a3
chore: proper job params
adit-bala Feb 23, 2025
7c553a3
Merge pull request #792 from asuc-octo/feat/helm-diff-master-ver
adit-bala Feb 23, 2025
752b13f
Update helm-diff.yaml
adit-bala Feb 23, 2025
7fcfe7a
only run on comments
adit-bala Feb 23, 2025
8845cda
Merge pull request #793 from asuc-octo/feat/helm-diff-master-ver
adit-bala Feb 23, 2025
0000b3b
add enrollment survey link
maxmwang Mar 2, 2025
5bdce22
modify configs for fall2025 data (#806)
maxmwang Mar 28, 2025
a22fef6
update .gitlab-ci to bypass cloudlfare proxy firewall
maxmwang Mar 30, 2025
94ef56c
fix build issues, update fall2025 updater
maxmwang Apr 4, 2025
1e04e97
Create runbook-restore-prod-mongo.yaml (#810)
klhftco Apr 7, 2025
86ac95e
Merging with gql
khankamolk Apr 9, 2025
7ee149d
Merging with gql
khankamolk Apr 9, 2025
0831692
Still super buggy & messy
khankamolk Apr 12, 2025
9e78747
Everything renders but CSS needs major fixing
khankamolk Apr 17, 2025
3f1cd83
merged with latest of gql
khankamolk Apr 17, 2025
d63215a
color changes
tranmary Apr 17, 2025
1db86c2
Fixed colors and stlying for onboarding
khankamolk Apr 17, 2025
6be941f
Deleted unused modules
khankamolk Apr 17, 2025
5dac394
added gradtrak to navbar
garimau Apr 24, 2025
ef5d008
Updated some color tokens in semester block
tranmary Apr 24, 2025
32c6972
fixed link/routing flow, updated sidepanel to take data from onboarding
garimau Apr 24, 2025
afdf448
implemented the manual satisfy requirement feature
garimau Apr 25, 2025
98a5623
minor edits
garimau Apr 25, 2025
a7dbdd0
Mergine
khankamolk Apr 28, 2025
78d9a59
styling: dashboard structure is fixed
khankamolk Apr 28, 2025
c265359
styling: fixed sdashboard sidepanel spacing
khankamolk Apr 28, 2025
4269c3d
fix: styling for semester blocks
khankamolk Apr 30, 2025
e40ce4d
fix: styling for add class/search for class popover
khankamolk Apr 30, 2025
6e963bf
fix: styling for edit class
khankamolk May 1, 2025
1a9a663
removing unused packages and styles
khankamolk May 1, 2025
ae39ddc
fixed frontend build
khankamolk May 1, 2025
0ed1494
fix: frontend build
khankamolk May 1, 2025
78ac8cb
frontend build successful
khankamolk May 1, 2025
0778576
Search for classes works
khankamolk May 2, 2025
67a6cc9
fix: create custom class now works
khankamolk May 2, 2025
2dfbb87
fixed suggestions popover
khankamolk May 3, 2025
ec57471
beta banner
ARtheboss Jul 31, 2025
8c41b01
Local changes
khankamolk Aug 16, 2025
1de32ca
Merge with main
khankamolk Aug 16, 2025
3ac0750
Updated
khankamolk Aug 17, 2025
a73767c
Merge branch 'gql' into gql-gradtrak-frontend
Chengming-Li Sep 23, 2025
8ae8ffd
working skip button
ARtheboss Sep 23, 2025
5d8db9a
Merge branch 'gql-gradtrak-frontend' of https://github.com/asuc-octo/…
ARtheboss Sep 23, 2025
f7ec34d
remove stuff from master
ARtheboss Sep 23, 2025
25fb66f
semi-working display menu
ARtheboss Sep 23, 2025
9df44cf
eye improvements
ARtheboss Sep 23, 2025
44c2b60
Add overflow auto
quincythai Sep 26, 2025
7ee2452
Link backend with gradtrak frontend (#847)
Chengming-Li Sep 26, 2025
4edba80
Reimplement to use catalog search for gradtrak (#848)
Chengming-Li Oct 2, 2025
9e44e14
labels (#849)
ARtheboss Oct 2, 2025
c482db1
Implement add semester functionality (#851)
Chengming-Li Oct 2, 2025
5347216
GradTrak Pass/No Pass and Transfer Credit (#846)
sriyasth Oct 3, 2025
398095c
Add College Selection to Onboarding (#854)
Chengming-Li Oct 3, 2025
38ee626
fix bug with deleting a tag resets the classes tags to the tags it ha…
Chengming-Li Oct 3, 2025
c774d79
Added detail dropdown to Gradtrak SemesterBlock (#852)
ARtheboss Oct 3, 2025
3052ece
Merge GQL into branch (#861)
Chengming-Li Oct 7, 2025
f27f7c6
logic engine initial commit
ARtheboss Oct 7, 2025
c5613d7
rename directly in SemesterBlock title (#855)
ARtheboss Oct 7, 2025
b62184f
Enable scrolling when course details dropdown is open (#866)
sriyasth Oct 7, 2025
95d8b7b
Fix scrolling when adding class to semester block. (#864)
sriyasth Oct 7, 2025
566434b
added pnp label and fixed labels formatting (#863)
sriyasth Oct 7, 2025
8260952
select key error
ARtheboss Oct 8, 2025
ce78e3b
Merge branch 'gql-gradtrak-frontend' of https://github.com/asuc-octo/…
ARtheboss Oct 8, 2025
f8335f4
Fix bug with sidebar background not expanding to fill space (#865)
Chengming-Li Oct 8, 2025
75e2af4
Implement Filtering for Classes (#856)
Chengming-Li Oct 8, 2025
36f7cb8
Fix bug with custom class not removing placeholder (#862)
Chengming-Li Oct 8, 2025
9b41071
show grading functionality
ARtheboss Oct 8, 2025
91d4320
fix classdetails close non-responsive issue
ARtheboss Oct 8, 2025
0bb1d56
Merge remote-tracking branch 'origin/gql-gradtrak-frontend' into gql-…
ARtheboss Oct 9, 2025
9100a0a
more changes
ARtheboss Oct 10, 2025
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
2 changes: 2 additions & 0 deletions .github/workflows/cd-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: .
file: ./apps/${{ matrix.image }}/Dockerfile
target: ${{ matrix.image }}-prod
tags: ${{ secrets.DOCKER_USERNAME }}/bt-${{ matrix.image }}:${{ inputs.image_tag }}
cache-from: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/cd-deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ concurrency:
on:
push:
branches: [master, gql]
paths: ["docs/**", "infra/docs/**"]
paths: ["apps/docs/**", "infra/docs/**"]

jobs:
build-push:
Expand All @@ -30,7 +30,8 @@ jobs:
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: docs
context: .
file: ./apps/docs/Dockerfile
target: docs-prod
tags: ${{ secrets.DOCKER_USERNAME }}/bt-docs:prod
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/bt-docs:prod-cache
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/cd-deploy-storybook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ name: Deploy Storybook
on:
push:
branches: [master, gql]
paths: ["packages/common/src/**", ".storybook/**", "Dockerfile", "docker-compose.yml", ".github/workflows/cd-deploy-storybook.yaml", "infra/storybook/**"]
paths:
[
"packages/theme/**",
"apps/storybook/**",
".github/workflows/cd-deploy-storybook.yaml",
"infra/storybook/**",
]

jobs:
build-push-image:
Expand All @@ -26,7 +32,9 @@ jobs:
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: .
target: storybook-prod
file: ./apps/storybook/Dockerfile
tags: ${{ secrets.DOCKER_USERNAME }}/bt-storybook:prod
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/bt-storybook:prod-cache
cache-to: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/bt-storybook:prod-cache,mode=max
Expand Down Expand Up @@ -56,7 +64,6 @@ jobs:
helm package storybook --version 0.1.0 --dependency-update
helm push bt-storybook-0.1.0.tgz oci://registry-1.docker.io/${{ secrets.DOCKER_USERNAME }}


deploy:
name: SSH and Deploy
needs: [build-push-image, build-push-chart]
Expand Down
109 changes: 33 additions & 76 deletions .github/workflows/cd-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,100 +1,57 @@
name: Deploy to Development

concurrency:
group: dev-${{ github.ref }}
cancel-in-progress: true
name: Deploy to Dev

on:
workflow_dispatch:
inputs:
ttl:
description: "Deployment time to live in hours"
description: "Deployment time to live in seconds"
required: true
type: number
default: 1
default: 86400

jobs:
compute-sha:
name: Compute sha_short
deploy:
runs-on: ubuntu-latest
outputs:
sha_short: ${{ steps.vars.outputs.sha_short }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set vars
id: vars
run: |
echo "sha_short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
run: echo "sha_short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV

build-push:
name: Build and Push Images and Charts
needs: [compute-sha]
uses: ./.github/workflows/cd-build.yaml
with:
image_tag: ${{ needs.compute-sha.outputs.sha_short }}
chart_ver: 0.1.0-dev-${{ needs.compute-sha.outputs.sha_short }}
secrets: inherit
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

deploy:
name: SSH and Deploy
needs: [compute-sha, build-push]
uses: ./.github/workflows/cd-deploy.yaml
with:
environment: development
name: bt-dev-app-${{ needs.compute-sha.outputs.sha_short }}
version: 0.1.0-dev-${{ needs.compute-sha.outputs.sha_short }}
values: |
env: dev
ttl: ${{ inputs.ttl }}
frontend:
image:
tag: '${{ needs.compute-sha.outputs.sha_short }}'
backend:
image:
tag: '${{ needs.compute-sha.outputs.sha_short }}'
datapuller:
suspend: true
image:
tag: '${{ needs.compute-sha.outputs.sha_short }}'
host: ${{ needs.compute-sha.outputs.sha_short }}.dev.stanfurdtime.com
mongoUri: mongodb://bt-dev-mongo-mongodb-0.bt-dev-mongo-mongodb-headless.bt.svc.cluster.local:27017/bt
redisUri: redis://bt-dev-redis-master.bt.svc.cluster.local:6379
host: ${{ needs.compute-sha.outputs.sha_short }}.dev.stanfurdtime.com
secrets: inherit
- name: Build Images with Tags
run: |
docker build --target backend-dev --tag "${{ secrets.DOCKER_USERNAME }}/bt-backend:${{ env.sha_short }}" .
docker build --target frontend-dev --tag "${{ secrets.DOCKER_USERNAME }}/bt-frontend:${{ env.sha_short }}" .

limit-deploy:
name: SSH and Limit Deployments
needs: [deploy]
runs-on: ubuntu-latest
steps:
- name: SSH and Check Deployments
uses: appleboy/ssh-action@v1.2.0
- name: Push Images to Docker Hub
run: |
docker push "${{ secrets.DOCKER_USERNAME }}/bt-backend:${{ env.sha_short }}"
docker push "${{ secrets.DOCKER_USERNAME }}/bt-frontend:${{ env.sha_short }}"

- name: SSH and Helm Install
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
username: root
key: ${{ secrets.SSH_KEY }}
script: |
set -e # Exit immediately if a command fails

# Get bt-dev-app- deployments sorted by creation timestamp
deployments=$(helm list \
--namespace=bt \
--date \
--short | grep '^bt-dev-app') || true
deployment_count=$(echo "$deployments" | wc -l)

# Check if deployment count > 8
if [ "$deployment_count" -gt 8 ]; then
echo "Too many deployments. Deleting the oldest deployment."

# Get oldest deployment from first line of deployments
oldest_deployment=$(echo "$deployments" | head -n 1)

# Uninstall deployment
helm uninstall "${oldest_deployment}"
else
echo "Deployment count is <= 8."
fi
cd ./infra
helm uninstall bt-dev-app-${{ env.sha_short }} || true
helm install bt-dev-app-${{ env.sha_short }} ./app --namespace=bt \
--set env=dev \
--set ttl=${{ inputs.ttl }} \
--set frontend.image.tag=${{ env.sha_short }} \
--set backend.image.tag=${{ env.sha_short }} \
--set host=${{ env.sha_short }}.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
135 changes: 113 additions & 22 deletions .github/workflows/cd-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,129 @@
name: Deploy to Production

concurrency: production
concurrency: prod

on:
workflow_dispatch:

env:
artifact-retention-days: 7

jobs:
branch-check:
name: Environment Check
name: Check Branch
runs-on: ubuntu-latest
environment: production
environment: prod

steps:
- name: Pass
run: echo "Passed check"

build-push:
name: Build and Push Images and Charts
needs: [branch-check]
uses: ./.github/workflows/cd-build.yaml
with:
image_tag: prod
chart_ver: "1.0.0"
secrets: inherit
build-backend:
name: Build Backend Image
needs: branch-check
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Build Image with Tag
run: |
docker build --target backend-prod --tag "${{ secrets.DOCKER_USERNAME }}/bt-backend:prod" .
docker save "${{ secrets.DOCKER_USERNAME }}/bt-backend:prod" --output "bt-backend-prod.tar"

- name: Upload Image as Artifact
uses: actions/upload-artifact@v4
with:
name: "bt-backend-prod.tar"
path: "bt-backend-prod.tar"
retention-days: ${{ env.artifact-retention-days }}
overwrite: true

build-frontend:
name: Build Frontend Image
needs: branch-check
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Build Image with Tag
run: |
docker build --target frontend-prod --tag "${{ secrets.DOCKER_USERNAME }}/bt-frontend:prod" .
docker save "${{ secrets.DOCKER_USERNAME }}/bt-frontend:prod" --output "bt-frontend-prod.tar"

- name: Upload Image as Artifact
uses: actions/upload-artifact@v4
with:
name: "bt-frontend-prod.tar"
path: "bt-frontend-prod.tar"
retention-days: ${{ env.artifact-retention-days }}
overwrite: true

push-backend:
name: Push Backend Image
needs: build-backend
runs-on: ubuntu-latest

steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Download Artifact as Image
uses: actions/download-artifact@v4
with:
name: "bt-backend-prod.tar"

- name: Push Image to Docker Hub
run: |
docker import "bt-backend-prod.tar" "${{ secrets.DOCKER_USERNAME }}/bt-backend:prod"
docker push "${{ secrets.DOCKER_USERNAME }}/bt-backend:prod"

push-frontend:
name: Push Frontend Image
needs: build-frontend
runs-on: ubuntu-latest

steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Download Artifact as Image
uses: actions/download-artifact@v4
with:
name: "bt-frontend-prod.tar"

- name: Push Image to Docker Hub
run: |
docker import "bt-frontend-prod.tar" "${{ secrets.DOCKER_USERNAME }}/bt-frontend:prod"
docker push "${{ secrets.DOCKER_USERNAME }}/bt-frontend:prod"

deploy:
name: SSH and Deploy
needs: [build-push]
uses: ./.github/workflows/cd-deploy.yaml
with:
environment: production
name: bt-prod-app
version: "1.0.0"
values: |
host: beta.berkeleytime.com
host: beta.berkeleytime.com
secrets: inherit
name: Deploy with SSH
needs: [push-backend, push-frontend]
runs-on: ubuntu-latest

steps:
- name: SSH and Helm Install
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: root
key: ${{ secrets.SSH_KEY }}
script: |
cd ./infra
if helm status bt-prod-app ; then
kubectl rollout restart bt-prod-app-backend
kubectl rollout restart bt-prod-app-frontend
else
helm install bt-prod-app ./app --namespace=bt \
--set host=stanfurdtime.com
fi
Loading