Skip to content

Commit 338452e

Browse files
authored
Update database configuration for production deployment
1 parent e422532 commit 338452e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

github-actions/workflows/deploy-prod.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ env:
1313
JDBC_PROD1: ${{ vars.JDBC_PROD1 }}
1414
JDBC_PROD2: ${{ vars.JDBC_PROD2 }}
1515
JDBC_CHECK: ${{ vars.JDBC_CHECK }}
16-
DB_PROD_2: ${{ vars.DB_NAME_PROD_2 }} # Used in report filename
16+
DB_PROD_1: ${{ vars.DB_NAME_PROD_1 }} # Used in report filename
1717

1818
# Repository Secrets - Create these in Project Settings > Secrets > Actions
1919
TOKEN: ${{ secrets.FLYWAY_TOKEN }}
20-
DB_USER_PROD: ${{ secrets.DB_USER_NAME_QA }}
21-
DB_USER_PW_PROD: ${{ secrets.DB_USER_PW_QA }}
20+
DB_USER_PROD: ${{ secrets.DB_USER_NAME_PROD1 }}
21+
DB_USER_PW_PROD: ${{ secrets.DB_USER_PW_PROD1 }}
22+
# If PROD2 needs a different User & Password input here and replace paramaters in flyway-deploy-prod-2 run step.
2223
# End of Environment Secrets #
2324

2425
generateDriftAndChangeReport: true
@@ -43,7 +44,7 @@ jobs:
4344

4445
- name: Create Drift and Change Report
4546
run: |
46-
flyway -email=${{ env.EMAIL }} -token=${{ env.TOKEN }} check -code -changes -drift -dryrun -cleanDisabled="false" -user=${{ env.DB_USER_PROD }} -password=${{ env.DB_USER_PW_PROD }} -url=${{ env.JDBC_PROD2 }} -check.buildUser=${{ env.DB_USER_PROD }} -check.buildPassword=${{ env.DB_USER_PW_PROD }} -check.buildUrl="${{ env.JDBC_CHECK }}" -reportFilename="${{ github.workspace }}\reports\${{ env.DB_PROD_2 }}-Run-${{ github.run_id }}-Check-Report.html" -IAgreeToTheEula -locations="filesystem:${{ github.workspace }}\migrations" -configFiles="${{ github.workspace }}/flyway.toml" -baselineOnMigrate=true -errorOverrides=S0001:0:I-
47+
flyway -email=${{ env.EMAIL }} -token=${{ env.TOKEN }} check -code -changes -drift -dryrun -cleanDisabled="false" -user=${{ env.DB_USER_PROD }} -password=${{ env.DB_USER_PW_PROD }} -url=${{ env.JDBC_PROD2 }} -check.buildUser=${{ env.DB_USER_PROD }} -check.buildPassword=${{ env.DB_USER_PW_PROD }} -check.buildUrl="${{ env.JDBC_CHECK }}" -reportFilename="${{ github.workspace }}\reports\${{ env.DB_PROD_1 }}-Run-${{ github.run_id }}-Check-Report.html" -IAgreeToTheEula -locations="filesystem:${{ github.workspace }}\migrations" -configFiles="${{ github.workspace }}/flyway.toml" -baselineOnMigrate=true -errorOverrides=S0001:0:I-
4748
continue-on-error: true
4849

4950
# Create a directory to stage the artifact files
@@ -57,7 +58,7 @@ jobs:
5758
name: flyway-reports
5859
path: reports/
5960

60-
# GitHub Actions doesn't natively support manual approval steps like some other CI/CD tools (e.g., Azure DevOps or GitLab).
61+
# GitHub Actions can support manual approval steps like some other CI/CD tools (e.g., Azure DevOps or GitLab).
6162
# You can achieve similar functionality using environments with required reviewers or by integrating external approval mechanisms.
6263
# Alternatively maybe a Review Branch prior to pulling to Production or another downstream environment.
6364

0 commit comments

Comments
 (0)