I have investigated this problem further and found the following:
I have added some log to the LogRotator.java in both 1.502 and 1.510 - in the 'perform' method:
Added print-out of artifactsDir in the loop below:
if(artifactNumToKeep!=null && artifactNumToKeep!=-1) {
List<? extends Run<?,?>> builds = job.getBuilds();
for (Run r : copy(builds.subList(Math.min(builds.size(), artifactNumToKeep), builds.size()))) {
LOGGER.log(INFO, "artifactsDir =
{0}
", r.getArtifactsDir());
The log seen in version 1.502 is e.g:
INFO: artifactsDir = /var/lib/jenkins/jobs/PJLTEST/modules/com.corena.core$repository-management/builds/2013-04-08_20-28-13/archive
while in 1.510 it is e.g.:
INFO: artifactsDir = /var/lib/jenkins/jobs/PJLTEST/builds/2013-04-08_20-29-49/archive
This shows that it is a completely different behaviour between the two version and now artifacts will be removed as the directory seen in 1.510 does not even exist.
I have investigated this problem further and found the following:
I have added some log to the LogRotator.java in both 1.502 and 1.510 - in the 'perform' method:
Added print-out of artifactsDir in the loop below:
if(artifactNumToKeep!=null && artifactNumToKeep!=-1) {
{0}List<? extends Run<?,?>> builds = job.getBuilds();
for (Run r : copy(builds.subList(Math.min(builds.size(), artifactNumToKeep), builds.size()))) {
LOGGER.log(INFO, "artifactsDir =
", r.getArtifactsDir());
The log seen in version 1.502 is e.g:
INFO: artifactsDir = /var/lib/jenkins/jobs/PJLTEST/modules/com.corena.core$repository-management/builds/2013-04-08_20-28-13/archive
while in 1.510 it is e.g.:
INFO: artifactsDir = /var/lib/jenkins/jobs/PJLTEST/builds/2013-04-08_20-29-49/archive
This shows that it is a completely different behaviour between the two version and now artifacts will be removed as the directory seen in 1.510 does not even exist.