Task #5397 (closed)
Opened 13 years ago
Closed 9 years ago
Delete tmp files on hudson
Reported by: | jamoore | Owned by: | sbesson |
---|---|---|---|
Priority: | minor | Milestone: | 5.1.2 |
Component: | General | Version: | 5.0.8 |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
In the INSIGHT-trunk job (and probably others) older builds that have no archive files can still be 8+ MB due to tmp files leftover from the "Tasks" and "Warnings" plugins:
A workaround Groovy script is provided at https://wiki.jenkins-ci.org/display/JENKINS/Delete+.tmp+files+left+in+workspace-files:
import hudson.model.* def counter = 0 // Create a ref for closure def delClos // Define closure delClos = { it.eachDir( delClos ); if(it.getName().contains("workspace-files")) { it.eachFile { if(it.getName().endsWith(".tmp") ){ println "Deleting file ${it.canonicalPath}"; it.delete() counter++; } } } } // Apply closure for(item in Hudson.instance.items) { println "Applying on " + item.rootDir delClos( item.rootDir ) } println counter + " files deleted"
Change History (3)
comment:1 Changed 9 years ago by jburel
- Version set to 5.0.8
comment:2 Changed 9 years ago by jamoore
- Milestone changed from Unscheduled to 5.1.0
- Owner set to sbesson
Anything of value to you here, seb? If not, *poof*
comment:3 Changed 9 years ago by sbesson
- Resolution set to wontfix
- Status changed from new to closed
Yes this is still existing as far as I could tell. However, given the size of our locked artifacts and our new generation of CI resources, I do not think there is any significant impact in investigating this. Marking as wontfix.
We can probably close that one.