Jenkins 替换pom发布

一, 增加全局变量

二,使用全局变量

主要是这句

call mvn -DdockerHost=%dockerHost250% -f %parent_dir%/springCloud.registry docker:build

三,-DdockerHost

对应pom文件 记得  -D节点名

<properties>
    <dockerHost>https://122.144.130.8:23755</dockerHost>
</properties>
原文地址:https://www.cnblogs.com/hanjun0612/p/13857005.html