-
Notifications
You must be signed in to change notification settings - Fork 1
/
liquibase.flowfile.ci.yaml
128 lines (125 loc) · 4.41 KB
/
liquibase.flowfile.ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
###
### This flowfile is intended to highlight capabilities of Liquibase Pro
### Review and update prior to use
###
### Liquibase version: 4.30.0+
###
### Liquibase sales: https://www.liquibase.com/contact-us
### Liquibase support: https://support.liquibase.com
###
###
### Prior to running the following files must exist in repository
###
### 1. liquibase.checks-settings.conf
### Liquibase policy checks configuration file
### https://docs.liquibase.com/liquibase-pro/policy-checks/home.html
###
### 2. changelog.main.xml
### Root Liquibase changelog file
### https://docs.liquibase.com/concepts/changelogs/home.html
###
###
### Global variables used in the flowfile
###
globalVariables:
###
### These variables are typically set via automation tools (see pipeline examples)
### NOTE: Any LIQUIBASE_* variable must be set outside this flow file!
### Value after ":-" in assignment is default value
###
### LIQUIBASE_SEARCH_PATH: REQUIRED
### https://docs.liquibase.com/parameters/search-path.html
### Use absolute paths when using Liquibase's Docker container
### LIQUIBASE_SEARCH_PATH: "/liquibase/changelog"
###
### LIQUIBASE_COMMAND_CHANGELOG_FILE: REQUIRED
### Root Liquibase changelog file
### https://docs.liquibase.com/concepts/changelogs/home.html
### LIQUIBASE_COMMAND_CHANGELOG_FILE: "changelog.main.xml"
###
### Secrets: REQUIRED
### These variables should be pulled from a secure vault via pipeline or Liquibase Pro extension
### https://docs.liquibase.com/tools-integrations/extensions/secrets-management/home.html
###
### LIQUIBASE_COMMAND_URL: "jdbc:h2:tcp://localhost:9090/mem:dev"
### LIQUIBASE_COMMAND_USERNAME: "dbuser"
### LIQUIBASE_COMMAND_PASSWORD: "letmein"
### LIQUIBASE_LICENSE_KEY: "12345"
###
### Structured logging
### Liquibase logs can be ingested by any standard observability tool (e.g., CloudWatch, Datadog, Elastic, Splunk)
### https://docs.liquibase.com/tools-integrations/observability/structured-logging.html
###
### LIQUIBASE_LOG_FILE: "liquibase.log.json"
### LIQUIBASE_LOG_FORMAT: "json"
### LIQUIBASE_LOG_LEVEL: "warning"
### LIQUIBASE_MIRROR_CONSOLE_MESSAGES_TO_LOG: "false"
###
### Other settings
### LIQUIBASE_COMMAND_CHECKS_RUN_CHECKS_OUTPUT: "issues"
### LIQUIBASE_COMMAND_CHECKS_RUN_CHECKS_SCRIPTS_ENABLED: "true"
### LIQUIBASE_SHOW_BANNER: "false"
###
### LB_BASE_DIR: REQUIRED
### The directory to write Liquibase output (e.g., logs, reports)
### LB_BASE_DIR: "/liquibase/changelogs"
LB_BASE_DIR: "${LB_BASE_DIR:-.}"
###
### LB_ENVIRONMENT: REQUIRED
### The environment within the pipeline to operate on (e.g., DEV, UAT, PROD)
### LB_ENVIRONMENT: "DEV"
LB_ENVIRONMENT: "${LB_ENVIRONMENT:-DEV}"
###
### Files
###
BASE_FLOW_FILE: "liquibase.flowfile.base.yaml"
###
### Operational Reports
### Liquibase Pro creates operational reports for certain commands
### These reports can be copied to a shared location for distribution to users (e.g., S3)
### https://docs.liquibase.com/tools-integrations/observability/operation-reports.html
###
CHECKS_REPORT: "Checks_${LB_ENVIRONMENT}.html"
###
### Workflow features
### Set these flags to T/F to turn Liquibase Pro features on/off
### These flags can also be set dynamically by an automation tool based on user input, environment, team, etc.
###
LB_TEST_CHECKS: "${LB_TEST_CHECKS:-T}"
###
### Stages to execute
###
stages:
Verify:
actions:
#
# Execute base commands
#
- type: liquibase
command: flow
cmdArgs: { flow-file: "${BASE_FLOW_FILE}" }
#
# View pending changes
# https://docs.liquibase.com/commands/change-tracking/status.html
#
- type: liquibase
command: status
cmdArgs: { label-filter: "${LB_LABELS}" }
PolicyChecks:
actions:
#
# Show policy checks
# https://docs.liquibase.com/liquibase-pro/policy-checks/home.html
#
- type: liquibase
if: "${LB_TEST_CHECKS} == T"
command: checks show
cmdArgs: { check-status: "enabled" }
#
# Run policy checks
# https://docs.liquibase.com/liquibase-pro/policy-checks/home.html
#
- type: liquibase
if: "${LB_TEST_CHECKS} == T"
command: checks run
cmdArgs: { report-enabled: "true", report-path: "${LB_BASE_DIR}", report-name: "${CHECKS_REPORT}", checks-scope: "changelog, database", changeset-filter: "pending", auto-update: "on" }