-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add check_tables command * Add check-tables workflow * Fix naming * fix command * Check Tables post deploy * Change file name * Prep v0.1.6 version change * Prep schedule for checking tables * Test v0.1.6 * Add check tables to dashboard * Add post deploy table check * Setup check table workflow * setup check table scheduler * Fix version reference * Add widget for Submissions within a backup window Testing dual query on the widget * Change backup log capture * Remove unnecessary columns * add row_count to check_tables operation * Version bump to v0.1.7 * Adds RowCount() prior to backup on the schedule * Version bump to v0.1.8 * Add widgets for Row Count
- Loading branch information
1 parent
5674d3e
commit 6ba74a0
Showing
8 changed files
with
216 additions
and
5 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: Check Tables Daily | ||
on: | ||
schedule: | ||
# Invoke every 12 hours | ||
- cron: '0 */12 * * *' | ||
workflow_dispatch: null | ||
|
||
jobs: | ||
check-tables: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
environment: | ||
- name: dev | ||
- name: staging | ||
- name: production | ||
- name: preview | ||
uses: ./.github/workflows/fac-check-tables.yml | ||
secrets: inherit | ||
with: | ||
environment: ${{ matrix.environment.name }} | ||
util_version: "v0.1.8" | ||
backup_operation: "check_tables" |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
name: Check existing tables in an environment | ||
### Common Commands: | ||
# ./fac-backup-util.sh v0.1.8 check_tables | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
required: true | ||
type: choice | ||
options: | ||
- 'dev' | ||
- 'preview' | ||
- 'staging' | ||
- 'production' | ||
util_version: | ||
description: Version for fac backup utility to use (ex. vX.Y.Z) | ||
required: true | ||
type: string | ||
backup_operation: | ||
description: Operation for fac-backup-utility | ||
required: true | ||
type: choice | ||
options: | ||
- 'check_tables' | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
util_version: | ||
description: Version for fac backup utility to use (ex. vX.Y.Z) | ||
required: true | ||
type: string | ||
backup_operation: | ||
description: Operation for fac-backup-utility | ||
required: true | ||
type: string | ||
jobs: | ||
fac-check-tables: | ||
name: Check tables in FAC Database | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environment }} | ||
env: | ||
space: ${{ inputs.environment }} | ||
steps: | ||
- name: Check tables in ${{ env.space }} | ||
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 2G -m 3G --name check_tables --command "./fac-backup-util.sh ${{ inputs.util_version }} ${{ inputs.backup_operation }}" |
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
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