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

Deploy to prod #250

Merged
merged 35 commits into from
Dec 5, 2021
Merged

Deploy to prod #250

merged 35 commits into from
Dec 5, 2021

Conversation

thekaveman
Copy link
Member

No description provided.

thekaveman and others added 30 commits December 1, 2021 00:48
this will make it possible to load via a glob pattern e.g.

    python manage.py loaddata fixtures/*.json

while ensuring the referential integrity by loading objects in the
correct order
use the glob pattern matching new sequence numbers
use the same glob pattern for sequence number files
- Removes unused CA State Web Template JS
since the test-ui job is used as a PR merge check,
we need a PR-related event to trigger the check
--> workflow_dispatch doesn't trigger the check

https://github.community/t/workflow-dispatch-does-not-update-commit-status/125981/2

so run the job on all PRs to the deploy branches
our code (js, python) is not compiled
Django silently rewrites our static files using a hash of their content
enabling longer caching times and better cache busting
we can cache for a long time since Django will rewrite
filenames when the contents changes
aws s3 cp doesn't recognize glob/unix file patterns in the path,
they can be used with exclude/include flags though

https://docs.aws.amazon.com/cli/latest/reference/s3/index.html#use-of-exclude-and-include-filters

pattern support is needed to load the new separated fixture files

CONFIG_FILE is set in the .env file inside the same AWS_BUCKET
push directly to deploy branches is blocked with protection rules

no need to check on PR and push, check runs on PR only
rather than relying on implicit interpretation of the DJANGO_INIT_PATH
variable, explicitly list it, then xargs the results into loaddata
revert 59a2169 "fix(aws): copy files matching CONFIG_FILE pattern"
revert 7165505 "fix(init): list init files, xargs to loaddata"

passing environment variables through for multiple files isn't working
@thekaveman thekaveman added this to the December 2021 milestone Dec 5, 2021
@thekaveman thekaveman added this to In progress in Benefits 2021 via automation Dec 5, 2021
@thekaveman thekaveman merged commit e8f37c4 into prod Dec 5, 2021
Benefits 2021 automation moved this from In progress to Done Dec 5, 2021
@github-actions github-actions bot added the deployment [auto] Pull requests that deploy to test or prod label Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment [auto] Pull requests that deploy to test or prod
Projects
No open projects
Benefits 2021
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants