Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LbNightlyTools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb Core Software
LbNightlyTools
Commits
cff826fb
Commit
cff826fb
authored
1 week ago
by
Marco Clemencic
Browse files
Options
Downloads
Patches
Plain Diff
update retention periods for artifacts
parent
82426280
No related branches found
No related tags found
1 merge request
!436
update retention periods for artifacts
Pipeline
#11096512
passed
1 week ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cron/cleanup_artifacts.sh
+15
-7
15 additions, 7 deletions
cron/cleanup_artifacts.sh
with
15 additions
and
7 deletions
cron/cleanup_artifacts.sh
+
15
−
7
View file @
cff826fb
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment