Skip to content

Commit

Permalink
Merge pull request #2180 from GSA-TTS/main
Browse files Browse the repository at this point in the history
  • Loading branch information
jadudm authored Sep 20, 2023
2 parents 91da84c + f38ad9d commit 58c8150
Show file tree
Hide file tree
Showing 61 changed files with 1,494 additions and 2,812 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,36 @@ jobs:
cf_space: ${{ env.space }}
cf_command: update-user-provided-service fac-key-service -p '"{\"SAM_API_KEY\":\"${{ secrets.SAM_API_KEY }}\", \"DJANGO_SECRET_LOGIN_KEY\":\"${{ secrets.DJANGO_SECRET_LOGIN_KEY }}\", \"LOGIN_CLIENT_ID\":\"${{ secrets.LOGIN_CLIENT_ID }}\", \"SECRET_KEY\":\"${{ secrets.SECRET_KEY}}\"}"'

- name: Bind backup s3 bucket to prod app
if: startsWith(github.ref, 'refs/tags/v1.')
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: gsa-tts-oros-fac
cf_space: ${{ env.space }}
command: cf bind-service gsa-fac backups -w

- name: Backup the database (Prod Only)
if: startsWith(github.ref, 'refs/tags/v1.')
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: gsa-tts-oros-fac
cf_space: ${{ env.space }}
command: cf run-task gsa-fac -k 1G -m 1G --name pg_backup --command "./backup_database.sh"

- name: Unbind backup s3 bucket from prod app
if: startsWith(github.ref, 'refs/tags/v1.')
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_USERNAME }}
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: gsa-tts-oros-fac
cf_space: ${{ env.space }}
command: cf unbind-service gsa-fac backups

- name: Deploy fac to cloud.gov
uses: cloud-gov/cg-cli-tools@main
with:
Expand Down
13 changes: 12 additions & 1 deletion backend/apt.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
---
# Because cf is using jammy jellyfish, and this https://packages.ubuntu.com/jammy/amd64/database/
# does not actually have postgresql-client-15 natively (only goes to 14),
# we are having to source the version from apt.postgresql.org. This however,
# eliminates the need to run v14 for load_data.sh, and can be run on v15.
# With v15, we are also able to run python manage.py dbbackup to backup the database
# to a defined s3 bucket. Running v15 also matches the client and server database versions.
cleancache: true
keys:
- https://www.postgresql.org/media/keys/ACCC4CF8.asc
repos:
- deb https://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main
packages:
- postgresql-client
- postgresql-client-15
1 change: 1 addition & 0 deletions backend/audit/intake_to_dissemination.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ def load_general(self):
"is_usa_based",
"met_spending_threshold",
"multiple_eins_covered",
"secondary_auditors_exist",
)
general_data = omit(gen_key_exceptions, general_information)
general_data = general_data | {
Expand Down
Loading

0 comments on commit 58c8150

Please sign in to comment.