Roh*_*han 1 liquibase jenkins jenkins-pipeline liquibase-sql
我已经在 Jenkins 中安装了 Liquibase runner 1.3.0 插件,并尝试执行执行“diffChangeLog”命令后得到的 liquibase 更改日志脚本文件。在执行脚本文件时,出现Failed to read schema document ' http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd '异常。我已经检查了我的更改日志文件,它具有下面提到的标题。
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd
http://www.liquibase.org/xml/ns/pro
http://www.liquibase.org/xml/ns/pro/liquibase-pro-3.8.xsd
http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">
Run Code Online (Sandbox Code Playgroud)
但现在在这里,当我将标头中两个位置的“3.8”替换为“3.5”时,它就成功执行了。我希望仅使用“3.8”执行此操作。请帮忙。
变更日志中的标头仅指定将变更日志 xml 文件解析为对象时使用哪个 xsd(XML 架构描述)。该 xsd 嵌入在命令运行时使用的 liquibase jar 文件中。您面临的问题是 Jenkins v 1.3.0 的 Liquibase Runner 插件嵌入了旧版本的 liquibase jar。如果您查看该插件的更改历史记录,您将看到它包含 Liquibase 版本 3.5.3,因此您只能使用该版本中可用的 XML 标签。您可以将xsd设置为参考版本3.5。
Liquibase 的人员(包括我自己)目前正在致力于为 Jenkins 发布更新版本的 Liquibase 运行器插件,其中将包含更新版本的 Liquibase。我正在与原作者合作解决 Jenkins 团队标记的安全问题。我没有确定何时完成这件事。如果您需要更快,您可以自己构建该插件,在构建之前将 PR#16 应用于您的本地副本。该插件的源代码位于https://github.com/jenkinsci/liquibase-runner-plugin
如果您想了解有关 Liquibase XML 和 xsd 的更多信息,我在 Liquibase FAQ 中编写了涵盖该主题的部分。
| 归档时间: |
|
| 查看次数: |
4989 次 |
| 最近记录: |