-
Notifications
You must be signed in to change notification settings - Fork 1
Update Crowdcast for containerization and archive status #43
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
Merged
Merged
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
b7abda5
Update JS client URL
korlaxxalrok a2dffbf
Use local JS client
korlaxxalrok 16d9e79
Switch from briancla to delphi+crowdcast email address
korlaxxalrok adfc57c
Test for header mod
korlaxxalrok 8ee2aef
Fix tag closure
korlaxxalrok 59781c2
Remove bracket
korlaxxalrok 6497089
Try some 'this is archived' verbiage
korlaxxalrok 1af609d
Revise text
korlaxxalrok 163b3f4
Add CSS block to make some smallish red text
korlaxxalrok eef741e
Use new effect in span
korlaxxalrok ee0a3d0
Slight text update
korlaxxalrok 2370eb6
Update CI to run on dev and main
korlaxxalrok 6738978
TEST: Build on update-and-archive-epicast branch
korlaxxalrok a02e463
Fix CI
korlaxxalrok 34feb24
Fix indentation
korlaxxalrok ec7238d
Use correct ref path
korlaxxalrok b48299e
Move Dockerfile to project root, remove devops dir
korlaxxalrok 889d25d
Ok move it back
korlaxxalrok 7dcc14e
Use Dockerfile at devops path in CI
korlaxxalrok 5751a09
Really fix Dockerfile path in CI
korlaxxalrok 5b8b377
Update style, add text to index page
korlaxxalrok 0849d73
Reduce size
korlaxxalrok d49c121
Change size
korlaxxalrok b3af612
New effects, make text sizes different
korlaxxalrok da3c34d
Fix type, really add effects
korlaxxalrok 1748a8b
Make the archive warning a bit more dramatic
korlaxxalrok e5acf66
Update readme
korlaxxalrok 74d8819
Remove branch from CI
korlaxxalrok 32599cc
Slight verbiage change
korlaxxalrok aaf754d
Update support email address
korlaxxalrok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,44 +1,43 @@ | ||
name: CI | ||
on: | ||
push | ||
|
||
name: ci | ||
|
||
pull_request: | ||
push: | ||
jobs: | ||
build: | ||
build-tag-push-deploy: | ||
runs-on: ubuntu-latest | ||
if: > | ||
github.ref == 'refs/heads/main' || | ||
github.ref == 'refs/heads/dev' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# submodules: true # Fetch Hugo themes (true OR recursive) | ||
fetch-depth: 1 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: cmu-delphi-deploy-machine | ||
password: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_PAT }} | ||
|
||
- name: Build, tag, and push image to Github | ||
env: | ||
DEVOPS_DOCKER_FILE: ./devops/Dockerfile | ||
- name: Build, tag, and push image to GitHub Container Registry | ||
id: image | ||
run: | | ||
baseRef="${GITHUB_REF#*/}" | ||
baseRef="${baseRef#*/}" | ||
case "${baseRef}" in | ||
main) | ||
imageTag="latest" | ||
image_tag="latest" | ||
;; | ||
*) | ||
imageTag="${baseRef//\//_}" # replace `/` with `_` in branch name | ||
image_tag="${baseRef//\//_}" # replace `/` with `_` in branch name | ||
;; | ||
esac | ||
echo "using tag: --${imageTag}--" | ||
docker build -t ghcr.io/${{ github.repository }}:$imageTag --file ${DEVOPS_DOCKER_FILE} . | ||
docker push ghcr.io/${{ github.repository }}:$imageTag | ||
|
||
# trigger a webhook update | ||
cd ${{ github.workspace }} | ||
echo "using tag: --${image-tag}--" | ||
docker build -t ghcr.io/${{ github.repository }}:${image_tag} --file ./devops/Dockerfile . | ||
docker push ghcr.io/${{ github.repository }}:${image_tag} | ||
echo "IMAGE_TAG=${image_tag}" >> $GITHUB_OUTPUT | ||
- name: Trigger smee.io webhook to deploy new container image | ||
run: | | ||
curl -H "Authorization: Bearer ${{ secrets.DELPHI_DEPLOY_WEBHOOK_TOKEN }}" \ | ||
-X POST ${{ secrets.DELPHI_DEPLOY_WEBHOOK_URL }} \ | ||
-H "Content-Type: application/x-www-form-urlencoded" \ | ||
-d "repository=ghcr.io/${{ github.repository }}&tag=$imageTag" | ||
-d "repository=ghcr.io/${{ github.repository }}&tag=${{ steps.image.outputs.IMAGE_TAG }}" |
This file contains hidden or 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,17 +1,39 @@ | ||
# Status | ||
|
||
[](#) | ||
|
||
# About | ||
|
||
This is the **development** version of the website. | ||
The Crowdcast website for collecting flu forecasts. (Previously known as | ||
Epicast.) | ||
|
||
The site is live at <https://delphi.cmu.edu/crowdcast>. | ||
|
||
# Branches | ||
|
||
The website is deployed to two separate environments: `staging` and `production`. The code for those environments is kept in the | ||
[`dev`](https://github.com/cmu-delphi/www-epicast/tree/dev) and | ||
[`main`](https://github.com/cmu-delphi/www-epicast/tree/main) branches, | ||
respectively. | ||
|
||
## `dev` branch | ||
|
||
The `dev` branch is deployed to a Delphi-internal development environment where we can iterate quickly without worry of breaking the production site. | ||
|
||
## `main` branch | ||
|
||
The `main` branch is deployed to a public-facing production environment. It | ||
should contain only tested and reliable code. | ||
|
||
## Process | ||
|
||
**`main` should not be updated while a forecasting round is active** (i.e. | ||
Friday through Monday), except in case of a critical bugfix. | ||
|
||
Basic develop changes -> deploy/review in staging -> release to production workflow: | ||
|
||
- Start by creating a **[bug|fix|feature|etc]** branch based on `dev`. | ||
- Make a PR and tag a reviewer with your changes against `dev`. Once apporved and merged this will trigger CI to deploy the application at https://staging.delphi.cmu.edu/crowdcast. | ||
- Once staging is reviewed and deemed acceptable, make a PR against `main` and tag a reviewer. Once this is approved and merged the production version of the application will be available at https://delphi.cmu.edu/crowdcast | ||
|
||
1. it is generally safe to make changes here at any time, as they will not | ||
affect the production environment | ||
2. changes should be merged from this branch into | ||
[the prod branch](https://github.com/cmu-delphi/www-epicast/tree/prod), | ||
except for production-specific configuration | ||
# Development | ||
|
||
See | ||
[the master branch README.md](https://github.com/cmu-delphi/www-epicast/blob/master/README.md) | ||
for more information. | ||
For developing the website, see the | ||
[epicast development guide](docs/epicast_development.md). |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.