Question

I want to have a automatic deployment of my test system on every night to the dev@cloud system of cloudbees.

The problem is now that I use the dbm-update goal on grails and its trying to update the database from Jenkins. This is a problem because the com.cloudbees.jdbc.Driver is not available in this context. Only if the app is deployed to the test sytem.

Does somebody tried this already and can help me out with some tips how to solve or workaround this problem?

Thanks

Was it helpful?

Solution

You can set the updateOnStart flags in the plugin for your application in the test context,

grails.plugin.databasemigration.updateOnStart = true
grails.plugin.databasemigration.updateOnStartFileNames = ['changelog.groovy']

This will run the migrations when your test application starts, making you not need to do a separate dbm-update. Since this uses the same JDBC drivers as your running application, it should work.

OTHER TIPS

Look at the RUN console (https://run.cloudbees.com) - there you will find your MySQL settings

You can just use a standard MySQL JDBC driver to connect to the MySQL database from anywhere (including from DEV@cloud and your test cases).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top