{jenkins-plugin-info:pluginId=liquibase-runner}

Provides Liquibase build steps that evaluate liquibase changesets.

Important Upgrade Information
Version 1.2.0 now uses the Credentials Plugin to manage usernames and passwords to connect to the database. If you were using username & password configuration in the previous version of this plugin, be aware that credentials will be automatically created upon plugin update.

Features

Adds liquibase related operations (update, rollback, and dbdoc generation) as available build steps. See Liquibase documentation at http://www.liquibase.org.
Evaluated changesets and their details appear on the build's summary page.

Uses liquibase version 3.5.3.

Known Limitations

Installation

Common Configuration Amongst Builders

Simplest

By default, the plugin will use an instance of an H2 in-memory database, so you need only define the location of your changeset file.   Note that changes won't be persisted across builds (though you may persist the H2 database to disk, see tips).

Advanced

Those who would like more control over liquibase configuration may do so using options presented when using the "advanced" section of the builder configuration. Here you'll find most of liquibase's configuration exposed, including contexts and the JDBC URL used to access the database.

For convenience, the plugin includes a few database drivers for use. Alternatively, you may also define a classpath where a database driver may be loaded, and the driver classname.

Note that individual configuration values will override any found in a defined liquibase properties file.  This emulates how command-line usage of liquibase works.

Evaluate liquibase changesets step

Creating a job with this build step will run liquibase's update on the target database.  Alternatively, by checking "Test Rollbacks", liquibase's updateTestingRollbacks is executed.  Once a build has executed, details are provided about each changeset on the build summary.

Rollback liquibase changes step

The rollback build step invokes liquibase's "rollback" operation on the target database.  There are a few rollback strategies to choose from that correspond to liquibase's rollback commands (by tag, by date, and by count).

This build step is intended for use when you're deploying to a real environment, and the need arises to undo a previous liquibase update.

DbDoc Generation

This build step generates Liquibase's dbDoc based on the supplied changelog. See liquibase documentation.

It is recommended to use this in conjunction with the HTMLPublisher plugin

Pipeline Support

All liquibase operations are available to pipeline scripts. See documentation for information and examples.

Job DSL Integration

See documentation regarding
how to use the JobDSL plugin to generate liquibase projects.

Usage Tips

Version History

Version 1.3.0 (Feb 2, 2017)

Version 1.2.1 (Jan 9, 2017)

Version 1.2.0 (Jan 7, 2017)

1.1.0 (Aug 30, 2016)

Thanks to David Siegal for suggestions, testing, and guidance for this release.

1.0.2 (May 4, 2016)