The hudson build should create the temporary zip on a more appropriate location and delete it when it is no longer needed
authorJan Lahoda <jlahoda@netbeans.org>
Thu, 14 Jul 2011 15:29:41 +0200
changeset 63730f9ba213e1a
parent 636 2b9ece915e05
child 638 f1d1f902538a
The hudson build should create the temporary zip on a more appropriate location and delete it when it is no longer needed
remoting/server/hudson/src/main/java/org/netbeans/modules/jackpot30/hudson/IndexingBuilder.java
     1.1 --- a/remoting/server/hudson/src/main/java/org/netbeans/modules/jackpot30/hudson/IndexingBuilder.java	Thu Jul 14 15:29:08 2011 +0200
     1.2 +++ b/remoting/server/hudson/src/main/java/org/netbeans/modules/jackpot30/hudson/IndexingBuilder.java	Thu Jul 14 15:29:41 2011 +0200
     1.3 @@ -129,7 +129,7 @@
     1.4  
     1.5          String codeName = build.getParent().getName();
     1.6          ArgumentListBuilder args = new ArgumentListBuilder();
     1.7 -        FilePath targetZip = build.getWorkspace().createTempFile(codeName, "zip");
     1.8 +        FilePath targetZip = build.getBuiltOn().getRootPath().createTempFile(codeName, "zip");
     1.9  
    1.10          //XXX: there should be a way to specify Java runtime!
    1.11          args.add(new File(t.getHome(), "index.sh")); //XXX
    1.12 @@ -151,6 +151,7 @@
    1.13          File newCacheDir = new File(cacheDir, codeName + ".new");
    1.14  
    1.15          targetZip.unzip(new FilePath(newCacheDir));
    1.16 +        targetZip.delete();
    1.17  
    1.18          segCacheDir.renameTo(oldCacheDir);
    1.19