您的位置:軟件測試 > 開源軟件測試 > 開源配置管理工具 > HUDSON
徹底刪除hudson job的方法
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時(shí)間:[ 2014/1/2 14:31:08 ] 推薦標(biāo)簽:hudson 配置管理

三) Hudson.FileSystemProvisioner

此處需要實(shí)現(xiàn)序列化。并且各個(gè)slave重新下載slave.jar且重連。

discardWorkspace加入激活slave刪除文件夾的功能。

publicstaticfinalclassDefaultextendsFileSystemProvisionerimplements  Serializable{

       /**

      publicvoidprepareWorkspace(AbstractBuild<?, ?> build, FilePath ws, TaskListener listener)throwsIOException, InterruptedException {

       }

       publicvoiddiscardWorkspace(AbstractProject<?, ?> project, FilePath ws)throwsIOException, InterruptedException {

       //add byliangjz,遞歸刪除文件參考ZFSProvisioner

       ws.act(newFileCallable<Void>(){

               publicVoid invoke(File f, VirtualChannel channel)throwsIOException {

                   if(f!=null){

                     Util.deleteRecursive(f);

                   }                     

                   returnnull;

               }

           });

       }

上一頁12下一頁
軟件測試工具 | 聯(lián)系我們 | 投訴建議 | 誠聘英才 | 申請(qǐng)使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd