2016-08-23 113 views
0

我试图建立与自定义配置文件詹金斯工作,原始的XML如下所示(相关部分):JobDSL自定义配置文件

<buildWrappers> 
    <org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper plugin="[email protected]"> 
    <managedFiles> 
     <org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile> 
     <fileId>30de8d2f-621d-4c51-b644-4302b548fd15</fileId> 
     <targetLocation>./src/</targetLocation> 
     <variable/> 
     <replaceTokens>false</replaceTokens> 
     </org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile> 
    </managedFiles> 
    </org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapper> 
</buildWrappers> 

这里是我的JobDSL尝试:

job('example') { 
    configure{ 
    it/'buildWrappers' << 'org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile' { 
     managedFiles { 
      org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile{ 
       fileId '30de8d2f-621d-4c51-b644-4302b548fd15' 
       targetLocation './/src//' 
     } 
     } 
    } 
    } 
} 

我错过了什么?谢谢!

回答