Skip to content

Commit

Permalink
Merge pull request #2495 from DFE-Digital/adding-preprod-database-wor…
Browse files Browse the repository at this point in the history
…kflow

Adding preproduction for the database backup workflow as environment input
  • Loading branch information
shaheislamdfe authored Nov 6, 2024
2 parents 23f6eaa + f86dba4 commit 3b1ea32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
type: choice
options:
- test
- preprod
- production
backup-file:
description: |
Expand Down Expand Up @@ -61,7 +62,7 @@ jobs:
- name: Set environment variables
run: |
source global_config/${DEPLOY_ENV}.sh
tf_vars_file=${TF_VARS_PATH}/${DEPLOY_ENV}/variables.tfvars.json
tf_vars_file=${TF_VARS_PATH}/${CONFIG}/variables.tfvars.json
echo "CLUSTER=$(jq -r '.cluster' ${tf_vars_file})" >> $GITHUB_ENV
echo "RESOURCE_GROUP_NAME=${AZURE_RESOURCE_PREFIX}-${SERVICE_SHORT}-${CONFIG_SHORT}-rg" >> $GITHUB_ENV
echo "STORAGE_ACCOUNT_NAME=${AZURE_RESOURCE_PREFIX}${SERVICE_SHORT}dbbkp${CONFIG_SHORT}sa" >> $GITHUB_ENV
Expand Down Expand Up @@ -91,7 +92,7 @@ jobs:
with:
storage-account: ${{ env.STORAGE_ACCOUNT_NAME }}
resource-group: ${{ env.RESOURCE_GROUP_NAME }}
app-name: ${{ env.SERVICE_NAME }}-${{ env.DEPLOY_ENV }}-web
app-name: ${{ env.SERVICE_NAME }}-${CONFIG}-web
cluster: ${{ env.CLUSTER }}
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}
backup-file: ${{ env.BACKUP_FILE }}.sql
Expand Down

0 comments on commit 3b1ea32

Please sign in to comment.