|
|
|
[
Permlink
| « Hide
]
Martin [07/Sep/15 03:03 PM]
Why was this issue actually closed as won't fix? I am actually also interested in the size of published artifacts. Using the REST API does not provide the total size of the published artifacts.
Is there any possibility to get the total size of published artifacts to workaround it? Right now in order to get the total size of a published directory I need to traverse all files with REST and calculate the size by myself. Is there any chance to use some Java/Groovy code to do that?
Right now you may add a custom column, and for the column value write a groovy script something like below:
${groovy: import groovy.io.FileType def list = [] def totalSize = 0; build.artifactsDir.eachFileRecurse (FileType.FILES) { file -> totalSize += file.length(); \} return totalSize; } |