Try using find for cleaning taskotron artifacts/logs
This commit is contained in:
parent
e51aba3aeb
commit
cb749b30ed
3 changed files with 8 additions and 8 deletions
|
@ -18,8 +18,8 @@
|
|||
|
||||
- name: copy tmpwatch cronjob for taskotron artifacts and buildmaster
|
||||
template: src=taskotron-tmpwatch.cron.j2 dest=/etc/cron.d/taskotron-tmpwatch.cron owner=root group=root mode=0644
|
||||
when: deployment_type in ['stg', 'prod', 'local']
|
||||
when: deployment_type in ['prod', 'local']
|
||||
|
||||
- name: copy tmpfiles.d for artifacts and buildmaster
|
||||
template: src=tmpfiles.d.buildmaster.conf.j2 dest=/etc/tmpfiles.d/buildmaster.conf owner=root group=root mode=0644
|
||||
when: deployment_type in ['dev']
|
||||
- name: copy cronjob for cleaning old taskotron artifacts and buildmaster logs
|
||||
template: src=taskotron-clean.cron.j2 dest=/etc/cron.d/taskotron-clean.cron owner=root group=root mode=0644
|
||||
when: deployment_type in ['dev', 'stg']
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
0 0 * * * {{ buildmaster_user }} find {{ public_artifacts_dir }} -type d -mtime +120 | xargs -r rm -rf
|
||||
10 0 * * * {{ buildmaster_user }} find {{ buildmaster_dir }}/x86_64/ -type d -mtime +120 | xargs -r rm -rf
|
||||
20 0 * * * {{ buildmaster_user }} find {{ buildmaster_dir }}/i386/ -type d -mtime +120 | xargs -r rm -rf
|
||||
30 0 * * * {{ buildmaster_user }} find {{ buildmaster_dir }}/all/ -type d -mtime +120 | xargs -r rm -rf
|
|
@ -1,4 +0,0 @@
|
|||
d /srv/taskotron/artifacts 0775 buildmaster buildmaster 120d
|
||||
d /srv/buildmaster/master/x86_64 0700 buildmaster buildmaster 120d
|
||||
d /srv/buildmaster/master/i386 0700 buildmaster buildmaster 120d
|
||||
d /srv/buildmaster/master/all 0700 buildmaster buildmaster 120d
|
Loading…
Add table
Add a link
Reference in a new issue