From a909394a9f95683bfe5ed0ba3d418389d745c22c Mon Sep 17 00:00:00 2001 From: Alex Steel <130377221+asteel-gsa@users.noreply.github.com> Date: Tue, 4 Jun 2024 10:06:55 -0400 Subject: [PATCH] Update verbiage and workflow options --- .../workflows/fac-backup-util-scheduled.yml | 5 ++--- .github/workflows/fac-backup-util.yml | 10 +++++++--- .github/workflows/fac-restore-util.yml | 18 +++++++++++------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/fac-backup-util-scheduled.yml b/.github/workflows/fac-backup-util-scheduled.yml index 2abc6fcf4f..41f434369b 100644 --- a/.github/workflows/fac-backup-util-scheduled.yml +++ b/.github/workflows/fac-backup-util-scheduled.yml @@ -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 @@ -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 }} @@ -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 }}" diff --git a/.github/workflows/fac-backup-util.yml b/.github/workflows/fac-backup-util.yml index 89ba35a2d6..bdda260a9c 100644 --- a/.github/workflows/fac-backup-util.yml +++ b/.github/workflows/fac-backup-util.yml @@ -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 @@ -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 }}" diff --git a/.github/workflows/fac-restore-util.yml b/.github/workflows/fac-restore-util.yml index 2e55c18be1..ba9201f0dd 100644 --- a/.github/workflows/fac-restore-util.yml +++ b/.github/workflows/fac-restore-util.yml @@ -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: @@ -26,7 +30,7 @@ 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 @@ -34,11 +38,11 @@ jobs: 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 }}"