Skip to content

Commit

Permalink
Added snapshot file
Browse files Browse the repository at this point in the history
  • Loading branch information
molivasdat authored Sep 6, 2023
1 parent 738eca1 commit a54ffc4
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion liquibase.flowfileprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ stages:
command: checks run
cmdArgs: {checks-scope: changelog}
#
# Run diff
# Update database type in cmdArgs (e.g., oracle, mssql, etc.)
#
- type: liquibase
command: diff
globalArgs: { outputfile: "${DIFF_FILE}" }
cmdArgs: { referenceURL: "offline:snowflake?snapshot=${SNAPSHOT_FILE}", format: json }
#
# Check for drift
# findstr for Windows agents, grep for Linux (and Liquibase's Docker container)
#
- type: shell
command: grep -E "unexpected|missing|changed" ${DIFF_FILE} >> /dev/null 2>&1 ; if [ $? -eq 0 ]; then exit 1; else exit 0; fi
#
# Review pending changes
#
- type: liquibase
Expand All @@ -28,9 +42,16 @@ stages:
#
- type: liquibase
command: update
#
# Create updated snapshot
#
- type: liquibase
command: snapshot
globalArgs: { outputfile: "${BASE_DIR}/${SNAPSHOT_FILE}" }
cmdArgs: { snapshotFormat: "json" }

## do these actions after all flow commands, regardless of whether the above commands were successful
endStage:
actions:
- type: liquibase
command: history
command: history

0 comments on commit a54ffc4

Please sign in to comment.