0

I am running gradle commands for liquibase to get the tag,validate,update.

I want to create a rollback as well. In my pipeline, how can get the last tag to rollback to ? Where can I get the tags from.

  ./gradlew -Ddb_url=$DB_HOST_URL -Ddb_username= -Ddb_password=$DB_PASSWORD updateSQL -PrunList=main
  ./gradlew -Ddb_url=$DB_HOST_URL -Ddb_username= -Ddb_password=$DB_PASSWORD validate -PrunList=main
  ./gradlew -Ddb_url=

1 Answers1

1

Are you looking to generate the SQL needed to rollback to the current state?

If so, you can use the generateFutureRollbackSql call to output that.

Otherwise, I don't know of a command that just returns the last tag. You could use a database query to get the last value of tag from the databasechangelog table via a database query plugin.

Nathan Voxland
  • 15,453
  • 2
  • 48
  • 64