Hi,
I’m using Liquibase 3.0.2 with maven 3.0.4 and Jenkins. I want generate the rollback script by contingence.
The config lines in my pom.xml is this:
org.liquibase
liquibase-maven-plugin
3.0.2
postgresql
postgresql
9.2-1002.jdbc4
generate-rollback-sql
process-resources
rollbackSQL
This is the configuration in Jenkins:
goals:
liquibase:rollbackSQL
maven opts:
-Dliquibase.driver=org.postgresql.Driver
-Dliquibase.url=$URL
-Dliquibase.username=$USERNAME
-Dliquibase.password=$PASSWORD
-Dliquibase.changeLogFile=$DBVC_DIR/changelog-master.xml
-Dliquibase.outputFileEncoding=UTF-8
-Dliquibase.migrationSqlOutputFile=$OUTPUT_FILE
-Dliquibase.loggin=DEBUG
-Dliquibase.rollbackTag=VERSION_1.0
The problem is that when I launch the task in Jenkins does not generate any errors but the output file does not have SQL statements. Each changeset has configured their rollback.
On the other hand, did the same with updateSQL and this generates the file with SQL statements without any problem.
This is the output file that generate rollbackSQL:
– *********************************************************************
– Rollback to ‘VERSION_1.0’ Script
– *********************************************************************
– Change Log: /usr/local/jenkins/jobs/Task/workspace/porject/changelog-master.xml
– Ran at: 9/26/13 3:19 PM
– Against: user@jdbc:postgresql://localhost:5432/db
– Liquibase version: 3.0.0-SNAPSHOT
– *********************************************************************
– Lock Database
– Release Database Lock
Note that at the end, in the output file, there is a line that says Lock Database, but I check the table databasechangeloglock and not locked.
Someone can help me please. Thank you!