-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
136 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
# ======================================== | ||
# Note: If you make changes to this CI/CD, please include someone from DevOps in the list of reviewers for the PR. | ||
# ======================================== | ||
|
@@ -7,125 +6,137 @@ name: Build and Deploy PennCourses | |
on: push | ||
|
||
jobs: | ||
backend-check: | ||
name: "Backend Check" | ||
uses: pennlabs/shared-actions/.github/workflows/django.yaml@6628edbdaca930c30423f904c2ed07b675089067 | ||
with: | ||
projectName: PennCourses | ||
path: backend | ||
flake: true | ||
black: true | ||
pythonVersion: 3.11-buster | ||
|
||
publish-backend: | ||
uses: pennlabs/shared-actions/.github/workflows/[email protected] | ||
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: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
needs: backend-check | ||
|
||
|
||
# Publish | ||
# ======================================================================================================== | ||
|
||
frontend-check: | ||
name: "Frontend Check" | ||
uses: pennlabs/shared-actions/.github/workflows/[email protected] | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
product: [review, plan, alert, degree-plan] | ||
with: | ||
path: frontend/${{ matrix.product }} | ||
nodeVersion: 18.19.0 | ||
|
||
publish-frontend: | ||
uses: pennlabs/shared-actions/.github/workflows/[email protected] | ||
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/[email protected] | ||
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/[email protected] | ||
|
||
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 | ||
backend-check: | ||
name: "Backend Check" | ||
uses: pennlabs/shared-actions/.github/workflows/django.yaml@238aa5ee908afba9f906641b51f82bb81572f66a | ||
with: | ||
projectName: PennCourses | ||
path: backend | ||
flake: true | ||
black: true | ||
pythonVersion: 3.11-buster | ||
codeCoverage: false | ||
|
||
publish-backend: | ||
uses: pennlabs/shared-actions/.github/workflows/[email protected] | ||
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@238aa5ee908afba9f906641b51f82bb81572f66a | ||
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/[email protected] | ||
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/[email protected] | ||
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/[email protected] | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,5 @@ pcr-backup* | |
./Pipfile | ||
./Pipfile.lock | ||
./package.json | ||
./yarn.lock | ||
./yarn.lock | ||
.tool-versions |