~fnordahl/ubuntu-openstack-ci/bug-1733984

« back to all changes in this revision

Viewing changes to run/job-parts/osci_job_common.sh

  • Committer: Frode Nordahl
  • Date: 2020-09-14 09:26:36 UTC
  • Revision ID: frode.nordahl@canonical.com-20200914092636-2cqaqnvmgz5vxjv8
Use ctime rather than mtime for cleanup

  During various build processing on task executors archives will be
  extracted to /tmp (pip, charm tools etc.). The mtime for the files
  extracted come from the archive itself and stems from the upstream
  build process. We most certainly would be more interested in when
  the files were changed on the local file system (ctime) for
  knowing what to clean up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
477
477
function f_tmp_cleanup(){
478
478
# Clean up tmp dir items as the jenkins user
479
479
  f_line "Cleaning up /tmp (Safe to ignore file/dir permission errors)"
480
 
  time find /tmp -type f -user jenkins -writable -readable -mmin +60 | xargs rm -rf ||:
481
 
  time find /tmp -type d -user jenkins -writable -readable -mmin +60 | xargs rm -rf ||:
 
480
  time find /tmp -type f -user jenkins -writable -readable -cmin +60 | xargs rm -rf ||:
 
481
  time find /tmp -type d -user jenkins -writable -readable -cmin +60 | xargs rm -rf ||:
482
482
}
483
483
 
484
484