Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
liquibase runner refusing to run on Jenkins Slave #10
Even if we set the Restrict where this project can be run to our slave, it still runs on master. Which is a problem because firewall rules prevent Jenkins master from accessing Postgres master but not the Jenkins Slave. Also we don't want that load on the master. This is the only plugin we have that does this. I even upgraded to 1.2.1 in hopes that might fix it.
Is this a bug or by design and can it be fixed?
I can tell you it isn't by explicit design.
I've created a jira issue here: https://issues.jenkins-ci.org/browse/JENKINS-41002
I'll provide updates on the Jira issue.
Sorry for your problem, and thank you for giving me the heads up!
After reviewing, this isn't something I can remedy quickly. You're quite correct in that Jenkins master (as of now) needs to be able to connect to the target database, as liquibase is exercised on the master.
I do, however, have this workaround. It involves modifying the Jenkins slave connection to setup port forwarding. I'm assuming that, in your situation, the Jenkins slave and the target postgres server are not one in the same (see below notes otherwise). I've used this approach elsewhere with success.
Once these steps are done, the Jenkins master's JDBC connection will go over ssh using port forwarding.