6

I am trying to find a solution that I can hopefully implement a regression test from one oracle database against another oracle DB via data.

Example: Database A adds a table, I want to take the data from database A and import it into database schema B. This will ultimately fail and I will know there was a change of some kind and can correct it.

I would like to automate this in Jenkins is possible for a nightly test. I found several paid versions but at this point in the project that is not necessary.

I am using Liquibase but I was unable to find a plugin for Jenkins. I am aware Sql Developer can do this but I want this to be automated.

If anyone has any past experiences or know any tools I would great appreciate the advice.

Mike3355
  • 11,305
  • 24
  • 96
  • 184
  • I don't know Jenkins at all, but this smells like a good test case for using Hibernate /JPA. You can read the schema from one database, create the models and then create another database based on this models. – hephestos Jul 04 '18 at 20:03

3 Answers3

3

Have you considered Oracle Data Pump? With it you can export data and/or schema metadata from one database and import it into another. There is a command line interface and a PL/SQL API.

eaolson
  • 14,717
  • 7
  • 43
  • 58
0

There is the liquibase runner plugin. Have you tried that?

Alternatively, you could install liquibase on the jenkins build agent and just execute it as a command line tool.

SteveDonie
  • 8,700
  • 3
  • 43
  • 43
  • The runner plugin is no longer supported according to its wiki. I wish I could use it, it appears it’s what I need. I want to find out if the data from DB 1 will successfully import to DB 2 with no errors. I know liquibase has a diff but not a data import like the use case I need. Am I wrong? – Mike3355 Jun 28 '18 at 17:35
  • Liquibase is really best-suited for structure, not data. I upvoted the answer that mentions Oracle Data Pump. – SteveDonie Jun 29 '18 at 16:07
0

You might be not need to have plugin for Jenkins but simple Gradle task to run in Jenkinsfile. I use Gradle plugin with config like:

task updateSQL(type: JavaExec) {

    group = "Liquibase"
    classpath configurations.liquibase
    main = "liquibase.integration.commandline.Main"

    args "--changeLogFile=***/changelog-current.xml"
    args ****
}

This valid for plugin: 'net.saliman:gradle-liquibase-plugin:XXX'

AlexGera
  • 756
  • 9
  • 19