|
|
|
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?
|
${groovy:
import groovy.io.FileType
def list = []
def totalSize = 0;
build.artifactsDir.eachFileRecurse (FileType.FILES) { file ->
totalSize += file.length();
\}
return totalSize;
}