Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing parameter and value to Gradle liquibase plugin

I'm using gradle liquibase plugin (https://github.com/liquibase/liquibase-gradle-plugin) but I don't understand how to pass parameters and values.

I want build a rollback based on tag and date but I'm only able to rollback on a tag with this command:

gradle rollback -DliquibaseTag=value 

I don't understand how I should pass data, tag or count.

My grade.build is very simple:

apply plugin: 'liquibase'

buildscript {

    repositories {

          mavenLocal()

      mavenCentral()

    }

    dependencies {

      classpath 'org.liquibase:liquibase-gradle-plugin:1.1.0'

      classpath 'com.h2database:h2:1.3.160'
    }
  }

liquibase {

    activities {

      main {

        changeLogFile 'changelog.xml'

        url 'jdbc:h2:db/liquibase_workshop'

        username 'sa'

        password ''
      } 

    }   
runList = 'main'

}
like image 576
lino Avatar asked Nov 09 '15 23:11

lino


1 Answers

It looks like the syntax may be a little different than documented. Instead try something like:

gradle rollbackCount -PliquibaseCommandValue=1

like image 156
Igor Avatar answered Oct 03 '22 04:10

Igor