db_restore task test #8
Workflow file for this run
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
--- | |
name: Backup the database with fac-backup-utility (restore test) | |
### Common Commands: | |
# ./fac-backup-util.sh v0.1.3 initial_backup | |
# ./fac-backup-util.sh v0.1.3 deploy_backup | |
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: | |
- 'initial_backup' | |
- 'deploy_backup' | |
push: | |
branches: [as/db-backup-util] | |
jobs: | |
fac-backup: | |
name: Perform Database Backup | |
runs-on: ubuntu-latest | |
# environment: ${{ inputs.environment }} | |
environment: "preview" | |
env: | |
# space: ${{ inputs.environment }} | |
space: "preview" | |
util_version: v0.1.3 | |
restore_operation: db_restore | |
s3_backup_path: "daily/06-04/" | |
steps: | |
- name: Backup FAC Database and Sync Media (restore test) | |
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 7G -m 3G --name deploy_backup_util --command "./fac-backup-util.sh ${{ inputs.util_version }} ${{ inputs.backup_operation }}" | |
command: cf run-task gsa-fac -k 7G -m 3G --name db_restore_util --command "./fac-restore-util.sh ${{ env.util_version }} ${{ env.restore_operation }} ${{ env.s3_backup_path }}" |