简体   繁体   English

liquibase 与詹金斯

[英]liquibase with Jenkins

I am new to both technologies and My application is up in a remote server and we are deploying the application through Jenkins.我对这两种技术都不熟悉,我的应用程序在远程服务器上运行,我们正在通过 Jenkins 部署应用程序。 Now we want to track all DB changes and are planning to use Liquibase.现在我们想要跟踪所有数据库更改并计划使用 Liquibase。 How can I integrate Liquibase with Jenkins?如何将 Liquibase 与 Jenkins 集成?

I have a Job that is executed in a Windows batch file as following:我有一个在 Windows 批处理文件中执行的作业,如下所示:


SET LIQUIBASE_HOME="C:\liquibase-3.8.2\"
SET logfile="procedures.log"
SET driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
SET classpath="../sqljdbc_8.2/enu/mssql-jdbc-8.2.0.jre8.jar"
SET url="jdbc:sqlserver://"
SET dbhost=192.168.0.1
SET dbport=1433
SET databasename="Ku"
SET dbusername="upgrade"
SET dbpassword="upgrade"
SET changeLogFile="procedures.xml"
SET loglevel="ERROR"
cd "%LIQUIBASE_HOME%"
liquibase --driver=%driver% --classpath=%classpath%  --changeLogFile=%AuditChangeSet% --url=%url%%dbHostPort%;databaseName=%databasename%  ^
--username=%dbusername% --password=%dbpassword% --logLevel=%loglevel% update


There is a jenkins plugin available for liquibase有一个可用于 liquibase 的 jenkins 插件

https://plugins.jenkins.io/liquibase-runner/ https://plugins.jenkins.io/liquibase-runner/

you can also consider writing shell scripts that does the job for you.您还可以考虑编写为您完成这项工作的 shell 脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM