gilde-ci-cd/documentation/chapters/templates/java/gradle/gradle-db-diff-template.adoc
2022-07-20 17:58:05 +02:00

22 lines
957 B
Plaintext

= Gradle Database Diff
This template generates a diff between the Liquibase schema and the Hibernate model of a database.
The resulting xml can be used as a base for schema changes.
Please look at the resulting changelog since it can have errors.
== Run against real Server
If you wand to run the integration against a real server.
Override `GRADLE_CLI_OPTS` with `-Dvariable.liquibase.database.url=<database_url>`.
It is also possible to add a service container with your desired Database.
Use the alias field in the service definition to define the address for the for `database_url`
.Variables
|===
|Name |Description | Default Value
|GRADLE_CLI_OPTS | Additional options send to gradle | ""
| PATH_TO_DIFF | Path to the resulting diff is defined in gradle config, this will also be exposed as the artifact of the Job. | "build/db-diff.xml"
|===
:template: java/gradle/gradle-database-diff.gitlab-ci.yml
include::../../../../template-printer.adoc[]