-
Notifications
You must be signed in to change notification settings - Fork 5
143 lines (114 loc) · 4.67 KB
/
shared-build-deploy.yaml
File metadata and controls
143 lines (114 loc) · 4.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# ========================================
# Note: If you make changes to this CI/CD, please include someone from DevOps in the list of reviewers for the PR.
# ========================================
name: Build and Deploy PennCourses
on: push
jobs:
backend-check:
name: "Backend Check"
uses: pennlabs/shared-actions/.github/workflows/django.yaml@b227580b1791e5812e58c1244595452fc848eff5
with:
projectName: PennCourses
path: backend
flake: true
black: false
pythonVersion: 3.11-buster
codeCoverage: false
dependencyManager: "uv"
publish-backend:
uses: pennlabs/shared-actions/.github/workflows/docker-publish.yaml@v0.1.7
with:
# Inputs
imageName: "penn-courses-backend"
githubRef: ${{ github.ref }}
gitSha: ${{ github.sha }}
# Optional inputs
# Path to the docker context
path: backend
# Path to the dockerfile (relative to `path` variable)
dockerfile: Dockerfile
# If enabled, will cache_from the latest version of the docker image.
cache: true
secrets: inherit
needs: backend-check
# Publish
# ========================================================================================================
frontend-check:
name: "Frontend Check"
uses: pennlabs/shared-actions/.github/workflows/react.yaml@b227580b1791e5812e58c1244595452fc848eff5
strategy:
fail-fast: true
matrix:
product: [review, plan, alert, degree-plan]
with:
path: frontend/${{ matrix.product }}
imageName: "${{ matrix.product.name }}-frontend"
githubRef: ${{ github.ref }}
gitSha: ${{ github.sha }}
nodeVersion: 18.19.0
skipReactPublish: true
skipCodecov: true
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
publish-frontend:
uses: pennlabs/shared-actions/.github/workflows/docker-publish.yaml@v0.1.7
strategy:
fail-fast: true
matrix:
product:
[
{ name: pcr, path: review },
{ name: pcp, path: plan },
{ name: pca, path: alert },
{ name: pdp, path: degree-plan },
]
with:
# Inputs
imageName: "${{ matrix.product.name }}-frontend"
githubRef: ${{ github.ref }}
gitSha: ${{ github.sha }}
# Path to the docker context
path: frontend
# Path to the dockerfile (relative to `path` variable)
dockerfile: ${{ matrix.product.path }}/Dockerfile
# If enabled, will cache_from the latest version of the docker image.
cache: true
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
needs: frontend-check
# ========================================================================================================
# Landing
# ========================================================================================================
publish-landing:
uses: pennlabs/shared-actions/.github/workflows/docker-publish.yaml@v0.1.7
with:
# Inputs
imageName: "pcx-landing"
githubRef: ${{ github.ref }}
gitSha: ${{ github.sha }}
# Path to the docker context
path: frontend/landing
# Path to the dockerfile (relative to `path` variable)
dockerfile: Dockerfile
# If enabled, will cache_from the latest version of the docker image.
cache: true
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# ========================================================================================================
# Deploy
deploy:
name: "Deploy"
uses: pennlabs/shared-actions/.github/workflows/deployment.yaml@v0.1.9
with:
githubRef: ${{ github.ref }}
gitSha: ${{ github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
GH_AWS_ACCESS_KEY_ID: ${{ secrets.GH_AWS_ACCESS_KEY_ID }}
GH_AWS_SECRET_ACCESS_KEY: ${{ secrets.GH_AWS_SECRET_ACCESS_KEY }}
needs:
- publish-backend
- publish-frontend