Skip to content

Commit

Permalink
Update verbiage and workflow options
Browse files Browse the repository at this point in the history
  • Loading branch information
asteel-gsa committed Jun 4, 2024
1 parent 3f84e04 commit a909394
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/fac-backup-util-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
environment:
required: true
type: string
default: "preview"
util_version:
description: Version for fac backup utility to use (ex. vX.Y.Z)
required: true
Expand All @@ -19,7 +18,7 @@ on:
required: true
type: string
jobs:
fac-backup:
fac-backup-scheduled:
name: Perform Database Backup
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
Expand All @@ -33,5 +32,5 @@ jobs:
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: gsa-tts-oros-fac
cf_space: ${{ env.space }}
command: cf run-task gsa-fac -k 3G -m 2G --name backup_util_scheduled --command "./fac-backup-util.sh ${{ inputs.util_version }} ${{ inputs.backup_operation }}"
command: cf run-task gsa-fac -k 7G -m 3G --name backup_util_scheduled --command "./fac-backup-util.sh ${{ inputs.util_version }} ${{ inputs.backup_operation }}"

10 changes: 7 additions & 3 deletions .github/workflows/fac-backup-util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
inputs:
environment:
required: true
type: string
default: "preview"
type: choice
options:
- 'dev'
- 'preview'
- 'staging'
- 'production'
util_version:
description: Version for fac backup utility to use (ex. vX.Y.Z)
required: true
Expand Down Expand Up @@ -40,4 +44,4 @@ jobs:
cf_password: ${{ secrets.CF_PASSWORD }}
cf_org: gsa-tts-oros-fac
cf_space: ${{ env.space }}
command: cf run-task gsa-fac -k 3G -m 2G --name backup_util --command "./fac-backup-util.sh ${{ inputs.util_version }} ${{ inputs.backup_operation }}"
command: cf run-task gsa-fac -k 7G -m 3G --name backup_util --command "./fac-backup-util.sh ${{ inputs.util_version }} ${{ inputs.backup_operation }}"
18 changes: 11 additions & 7 deletions .github/workflows/fac-restore-util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ on:
inputs:
environment:
required: true
type: string
default: "preview"
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
s3_backup_date:
description: 'Date of the folder in s3://${BUCKET}/backups/ (ex. YYYYMMDDHHmm)'
s3_backup_folder:
description: 'Name of the folder in s3://${BUCKET}/backups/ (ex. sheduled-mm-dd-HH)'
required: false
type: string
backup_operation:
Expand All @@ -26,19 +30,19 @@ on:
- 's3_restore'
- 'db_restore'
jobs:
fac-backup:
fac-restore:
if: contains('["asteel-gsa", "jadudm", "timoballard", "danswick", "tadhg-ohiggins"]', github.actor)
name: Perform Database Backup
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
env:
space: ${{ inputs.environment }}
steps:
- name: Backup FAC Database and Sync Media
- name: Restore FAC Database and Sync Media
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 3G -m 2G --name backup_util --command "./fac-restore-util.sh ${{ inputs.util_version }} ${{ inputs.backup_operation }} ${{ inputs.s3_backup_date }}"
command: cf run-task gsa-fac -k 7G -m 3G --name restore_util --command "./fac-restore-util.sh ${{ inputs.util_version }} ${{ inputs.backup_operation }} ${{ inputs.s3_backup_folder }}"

0 comments on commit a909394

Please sign in to comment.