Skip to content
Snippets Groups Projects
Commit cff826fb authored by Marco Clemencic's avatar Marco Clemencic
Browse files

update retention periods for artifacts

parent 82426280
No related branches found
No related tags found
1 merge request!436update retention periods for artifacts
Pipeline #11096512 passed
......@@ -23,23 +23,31 @@
logfile=/eos/user/l/lhcbsoft/logs/cleanup_artifacts.log
artifacts_dir=/eos/project/l/lhcbwebsites/www/lhcb-nightlies-artifacts
# retention periods in days
max=15
ci_test_bin=1
zst_archives=1
# clean up the artifacts directory (if present)
if [ -e ${artifacts_dir} ] ; then
echo "$(date): removing old artifacts from ${artifacts_dir}" >> $logfile 2>&1
# everything, including log files
find ${artifacts_dir} -mindepth 2 -maxdepth 3 \
-daystart -mtime +15 -and -path '*/lhcb-*' \
-daystart -mtime +$max -and -path '*/lhcb-*' \
-print -exec rm -rf \{} \; >> $logfile 2>&1
# binary artifacts for ci-tests
find ${artifacts_dir}/nightly/lhcb-*-mr -mindepth 2 -maxdepth 2 \
-daystart -mtime +3 -and -name 'packs' \
-daystart -mtime +$ci_test_bin -and -name 'packs' \
-print -exec rm -rf \{} \; >> $logfile 2>&1
find ${artifacts_dir} -maxdepth 5 -name structure.zip \
-daystart -mtime +$ci_test_bin \
-print -exec rm -rf \{} \; >> $logfile 2>&1
# alternative version of the artifacts
find ${artifacts_dir} -mindepth 6 -maxdepth 6 \
-daystart -mtime +3 -and -path '*/lhcb-*/*/*.tar.zst' \
-daystart -mtime +$zst_archives -and -path '*/lhcb-*/*/*.tar.zst' \
-print -exec rm -rf \{} \; >> $logfile 2>&1
find ${artifacts_dir} -maxdepth 5 -name structure.tar.zst \
-daystart -mtime +3 \
-daystart -mtime +$zst_archives \
-print -exec rm -rf \{} \; >> $logfile 2>&1
find ${artifacts_dir} \
-daystart -mtime +1 -type f -and -name 'ccache_dir.*.zip' \
-print -delete >> $logfile 2>&1
fi
echo "$(date): done" >> $logfile 2>&1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment