On Jenkins jobs, fix the cleaning post-task command on `/tmp` (argument to find's `-type` option)
diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index cf6eabf..84fce32 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -126,12 +126,10 @@
}
postBuildTask {
task('.', '''
- echo "Cleaning project…";
- ant realclean;
- echo "Reporting disk usage…";
- df -h ; du -hs `pwd` ; du -hs ../* ;
+ echo "Cleaning project…"; ant realclean;
+ echo "Reporting disk usage…"; df -h ; du -hs `pwd` ; du -hs ../* ;
echo "Cleaning tmp…";
- find /tmp -type -f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
+ find /tmp -type f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
''')
}
}
@@ -187,13 +185,11 @@
postBuildTask {
task('.', '''
echo "Finding job process orphans…"; if pgrep -af ${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi;
- echo "Cleaning project…";
- ant realclean;
- echo "Reporting disk usage…";
- df -h ; du -hs `pwd` ; du -hs ../* ;
+ echo "Cleaning project…"; ant realclean;
+ echo "Reporting disk usage…"; df -h ; du -hs `pwd` ; du -hs ../* ;
echo "Cleaning tmp…";
- find /tmp -type -f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
- ''')
+ find /tmp -type f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
+ ''')
}
}
}
@@ -248,13 +244,11 @@
postBuildTask {
task('.', '''
echo "Finding job process orphans…"; if pgrep -af ${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi;
- echo "Cleaning project…";
- ant realclean;
- echo "Reporting disk usage…";
- df -h ; du -hs `pwd` ; du -hs ../* ;
+ echo "Cleaning project…"; ant realclean;
+ echo "Reporting disk usage…"; df -h ; du -hs `pwd` ; du -hs ../* ;
echo "Cleaning tmp…";
- find /tmp -type -f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
- ''')
+ find /tmp -type f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
+ ''')
}
}
}
@@ -314,13 +308,11 @@
postBuildTask {
task('.', '''
echo "Finding job process orphans…"; if pgrep -af ${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi;
- echo "Cleaning project…";
- ant realclean;
- echo "Reporting disk usage…";
- df -h ; du -hs `pwd` ; du -hs ../* ;
+ echo "Cleaning project…"; ant realclean;
+ echo "Reporting disk usage…"; df -h ; du -hs `pwd` ; du -hs ../* ;
echo "Cleaning tmp…";
- find /tmp -type -f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
- ''')
+ find /tmp -type f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
+ ''')
}
}
}
@@ -573,13 +565,11 @@
postBuildTask {
task('.', '''
echo "Finding job process orphans…"; if pgrep -af ${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi;
- echo "Cleaning project…";
- ant realclean;
- echo "Reporting disk usage…";
- df -h ; du -hs `pwd` ; du -hs ../* ;
+ echo "Cleaning project…"; ant realclean;
+ echo "Reporting disk usage…"; df -h ; du -hs `pwd` ; du -hs ../* ;
echo "Cleaning tmp…";
- find /tmp -type -f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
- ''')
+ find /tmp -type f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
+ ''')
}
}
}
@@ -643,13 +633,11 @@
postBuildTask {
task('.', '''
echo "Finding job process orphans…"; if pgrep -af ${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi;
- echo "Cleaning project…";
- ant realclean;
- echo "Reporting disk usage…";
- df -h ; du -hs `pwd` ; du -hs ../* ;
+ echo "Cleaning project…"; ant realclean;
+ echo "Reporting disk usage…"; df -h ; du -hs `pwd` ; du -hs ../* ;
echo "Cleaning tmp…";
- find /tmp -type -f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
- ''')
+ find /tmp -type f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
+ ''')
}
}
}
@@ -718,13 +706,11 @@
postBuildTask {
task('.', '''
echo "Finding job process orphans…"; if pgrep -af ${JOB_BASE_NAME}; then pkill -9 -f ${JOB_BASE_NAME}; fi;
- echo "Cleaning project…";
- ant realclean;
- echo "Reporting disk usage…";
- df -h ; du -hs `pwd` ; du -hs ../* ;
+ echo "Cleaning project…"; ant realclean;
+ echo "Reporting disk usage…"; df -h ; du -hs `pwd` ; du -hs ../* ;
echo "Cleaning tmp…";
- find /tmp -type -f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
- ''')
+ find /tmp -type f -atime +3 -user jenkins -and -not -exec fuser -s {} ';' -and -delete 2>/dev/null
+ ''')
}
}
}