微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

迁移 XLDeploy Jenkins 插件到 Jenkins Pipeline (Jenkinsfile)

如何解决迁移 XLDeploy Jenkins 插件到 Jenkins Pipeline (Jenkinsfile)

我使用文档的语法,但我的树文件夹不同。

詹金斯文件

stage('deploy') {
    steps {
        script {
            xldCreatePackage artifactsPath: '.',manifestPath: 'deployit-manifest.xml',darPath: "foo-${properties.MsveRSION}-${BUILD_NUMBER}.dar"
        }
    }
}

deployit-manifest.xml :

<?xml version="1.0" encoding="UTF-8"?>
<udm.DeploymentPackage version="1.6.4-71" application="FOO-sample/aaa/bbb">
  <deployables>
    <iis-foo.WebContent name="/package FOO WebContent" file="/package FOO WebContent/FOO.Web.zip">
      <scanPlaceholders>true</scanPlaceholders>
      <textFileNamesRegex>.+\.(cfg | conf | config | ini | properties | props | txt | asp | aspx | htm | html | jsf | jsp | xht | xhtml | sql | xml | xsd | xsl | xslt | json | yml | cmd | bat | mrn)</textFileNamesRegex>
      <fileEncodings>
        <entry key=".+\.properties">ISO-8859-1</entry>
      </fileEncodings>
      <targetPath>{{CHEMIN_SITE}}</targetPath>
      <stopStartOnModify>true</stopStartOnModify>
      <applicationPoolName>{{APPLICATION_POOL_NAME_WEBCONTENT}}</applicationPoolName>
    </iis-foo.WebContent>
    <iis-foo.WebContent name="/package FOO WS" file="package FOO WS/FOO.ServicesWeb.zip">
      <scanPlaceholders>true</scanPlaceholders>
      <textFileNamesRegex>.+\.(cfg | conf | config | ini | properties | props | txt | asp | aspx | htm | html | jsf | jsp | xht | xhtml | sql | xml | xsd | xsl | xslt | json | yml | cmd | bat | mrn)</textFileNamesRegex>
      <fileEncodings>
        <entry key=".+\.properties">ISO-8859-1</entry>
      </fileEncodings>
      <targetPath>{{CHEMIN_SITE_WS}}</targetPath>
      <stopStartOnModify>true</stopStartOnModify>
      <applicationPoolName>{{APPLICATION_POOL_NAME_WS}}</applicationPoolName>
    </iis-foo.WebContent>
  </deployables>
  <dependencyResolution>LATEST</dependencyResolution>
  <undeployDependencies>false</undeployDependencies>
</udm.DeploymentPackage>

我的 .dar 文件内容(使用 jenkinsfile):

├── deployit-manifest.xml
├── FOO.Web.zip
├── FOO.ServicesWeb.zip

在使用 Jenkins 插件之前,我的 .dar 文件内容

├── deployit-manifest.xml
├── package FOO WebContent
│   ├── FOO.Web.zip
├── package WS
│   ├── FOO.ServicesWeb.zip

编辑:

插件(适用于 Jenkins 自由泳)创建一个名为 name artifact value 的文件

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。