Skip to content

Commit

Permalink
Merge pull request #9 from liquibase/JIRA-2
Browse files Browse the repository at this point in the history
add third repo
  • Loading branch information
dreads authored Dec 31, 2024
2 parents 88471f2 + 87f5282 commit 756559b
Show file tree
Hide file tree
Showing 7 changed files with 305 additions and 177 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/liquibase_pro_ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
repository: liquibase/cs-impl-guide-examples-sql
path: liquibase-sql

# Check out the Liquibase Configuration Repo to a folder, "liquibase-process"
# # Check out the Liquibase Configuration Repo to a folder, "liquibase-process"
# - name: Checkout Liquibase Configuration repo
# uses: actions/checkout@v4
# with:
Expand Down
62 changes: 62 additions & 0 deletions flowfiles/liquibase-deploy.flowfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
########## LIQUIBASE FLOWFILE ##########
########## learn more http://docs.liquibase.com/flow ##########

## Note: Any command which fails in any stage below result in the command stopping, and endStage being run.
## A flow file can have one or more stages, each with multiple "actions",
## or your flow file can have multiple stages with fewer actions in each stage.

## Call this flow using: liquibase flow --flow-file=flowfiles/liquibase-deploy.flowfile.yaml

stages:

Checks-Changelog:
actions:
- type: liquibase
command: checks run
cmdArgs: {
checks-scope: changelog,
checks-settings-file: "policychecks/liquibase.checks-settings.conf",
auto-update: "ON",
changeset-filter: "pending"
}
globalArgs: {
reports-name: "checks-report-deploy-changelog.html"
}

Status:
actions:
- type: liquibase
command: status
cmdArgs: {verbose: true}

Update-SQL:
actions:
- type: liquibase
command: update-sql

Update:
actions:
- type: liquibase
command: update

Checks-Database:
actions:
- type: liquibase
command: checks run
cmdArgs: {
checks-scope: database,
checks-settings-file: "policychecks/liquibase.checks-settings.conf",
auto-update: "ON"
}
globalArgs: {
reports-name: "checks-report-deploy-database.html"
}

## The endStage ALWAYS RUNS.
## So put actions here which you desire to perform whether previous stages' actions succeed or fail.
## If you do not want any actions to ALWAYS RUN, simply delete the endStage from your flow file.

endStage:
actions:
- type: liquibase
command: history
49 changes: 49 additions & 0 deletions flowfiles/liquibase-postmerge.flowfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
########## LIQUIBASE FLOWFILE ##########
########## learn more http://docs.liquibase.com/flow ##########

## Note: Any command which fails in any stage below result in the command stopping, and endStage being run.
## A flow file can have one or more stages, each with multiple "actions",
## or your flow file can have multiple stages with fewer actions in each stage.

## Call this flow using: liquibase flow --flow-file=flowfiles/liquibase-postmerge.flowfile.yaml

stages:

Status:
actions:
- type: liquibase
command: status
cmdArgs: {verbose: true}

Update-SQL:
actions:
- type: liquibase
command: update-sql

Update:
actions:
- type: liquibase
command: update

PostDeploy-Checks:
actions:
- type: liquibase
command: checks run
cmdArgs: {
checks-scope: database,
checks-settings-file: "policychecks/liquibase.checks-settings.conf",
auto-update: "ON",
changeset-filter: "pending"
}
globalArgs: {
reports-name: "checks-report-database.html"
}

## The endStage ALWAYS RUNS.
## So put actions here which you desire to perform whether previous stages' actions succeed or fail.
## If you do not want any actions to ALWAYS RUN, simply delete the endStage from your flow file.

endStage:
actions:
- type: liquibase
command: history
23 changes: 23 additions & 0 deletions flowfiles/liquibase-premerge.flowfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
########## LIQUIBASE FLOWFILE ##########
########## learn more http://docs.liquibase.com/flow ##########

## Note: Any command which fails in any stage below result in the command stopping, and endStage being run.
## A flow file can have one or more stages, each with multiple "actions",
## or your flow file can have multiple stages with fewer actions in each stage.

## Call this flow using: liquibase flow --flow-file=flowfiles/liquibase-premerge.flowfile.yaml

stages:

PreMerge-Checks:
actions:
- type: liquibase
command: checks run
cmdArgs: { checks-scope: changelog,
checks-settings-file: "policychecks/liquibase.checks-settings.conf",
auto-update: "ON",
changeset-filter: "pending"
}
globalArgs: {
reports-name: "checks-report-premerge.html"
}
32 changes: 32 additions & 0 deletions flowfiles/liquibase-rollback.flowfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
########## LIQUIBASE FLOWFILE ##########
########## learn more http://docs.liquibase.com/flow ##########

## Note: Any command which fails in any stage below result in the command stopping, and endStage being run.
## A flow file can have one or more stages, each with multiple "actions",
## or your flow file can have multiple stages with fewer actions in each stage.

## Call this flow using: liquibase flow --flow-file=flowfiles/liquibase-rollback.flowfile.yaml

stages:

Rollback-SQL:
actions:
- type: liquibase
command: rollback-one-update-sql

Rollback:
actions:
- type: liquibase
command: rollback-one-update
cmdArgs: {
force: true
}

## The endStage ALWAYS RUNS.
## So put actions here which you desire to perform whether previous stages' actions succeed or fail.
## If you do not want any actions to ALWAYS RUN, simply delete the endStage from your flow file.

endStage:
actions:
- type: liquibase
command: history
2 changes: 1 addition & 1 deletion liquibase.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://docs.liquibase.com/parameters/home.html

# Specifies the root changelog file to execute.
liquibase.command.changelogFile: sqlcode_by_objects_schema/rootchangelog.yaml
liquibase.command.changelogFile: liquibase-sql/sqlcode_by_objects_schema/rootchangelog.yaml

#Name of the default schema to use for the database connection. If defaultSchemaName
# is set, then objects do not have to be fully qualified.
Expand Down
Loading

0 comments on commit 756559b

Please sign in to comment.