Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Webtools Releng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
webtools
Releng
Webtools Releng
Commits
e2c12572
Commit
e2c12572
authored
14 years ago
by
david_williams
Browse files
Options
Downloads
Patches
Plain Diff
improve daily cleanup scripts
parent
4ab31c07
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
releng.control/cleanupArtifacts.sh
+7
-1
7 additions, 1 deletion
releng.control/cleanupArtifacts.sh
releng.control/removeUtils.shsource
+8
-8
8 additions, 8 deletions
releng.control/removeUtils.shsource
with
15 additions
and
9 deletions
releng.control/cleanupArtifacts.sh
+
7
−
1
View file @
e2c12572
...
@@ -164,15 +164,19 @@ echo;
...
@@ -164,15 +164,19 @@ echo;
# artifacts are special, since they have a three-layer directory structure,
# artifacts are special, since they have a three-layer directory structure,
# and we want to be sure to always retain at least one, no matter how old.
# and we want to be sure to always retain at least one, no matter how old.
echo
;
echo
"INFO: Checking to remove old artifacts."
echo
"INFO: Checking to remove old artifacts."
removeOldArtifactsDirectories
${
PROJECT_ARTIFACTS
}
3 1
;
removeOldArtifactsDirectories
${
PROJECT_ARTIFACTS
}
3 1
;
echo
;
echo
"INFO: Checking to remove old project working directories."
echo
"INFO: Checking to remove old project working directories."
removeOldDirectories
${
PROJECT_PROJECTS
}
0
;
removeOldDirectories
${
PROJECT_PROJECTS
}
0
;
echo
;
echo
"INFO: Checking to remove old testing directories."
echo
"INFO: Checking to remove old testing directories."
removeOldDirectories
${
PROJECT_TESTS
}
0
;
removeOldDirectories
${
PROJECT_TESTS
}
0
;
echo
;
echo
"INFO: Checking to remove old tmp directories and files."
echo
"INFO: Checking to remove old tmp directories and files."
removeOldDirectoriesAndFiles
${
RECOMMENDED_TMP_DIR
}
13
;
removeOldDirectoriesAndFiles
${
RECOMMENDED_TMP_DIR
}
13
;
...
@@ -186,9 +190,11 @@ removeOldDirectoriesAndFiles ${RECOMMENDED_TMP_DIR} 13;
...
@@ -186,9 +190,11 @@ removeOldDirectoriesAndFiles ${RECOMMENDED_TMP_DIR} 13;
# autodownload so when if/when we want it, we have to get our selves, and copy into prereqs directory.
# autodownload so when if/when we want it, we have to get our selves, and copy into prereqs directory.
# And one of those, I think oagis_release? has some write protected files that prevents their deletion,
# And one of those, I think oagis_release? has some write protected files that prevents their deletion,
# once unzipped, so we have tweeked the permissions.
# once unzipped, so we have tweeked the permissions.
echo
;
echo
"INFO: Checking to remove old pre-req directories and files not accessed for 3 months."
echo
"INFO: Checking to remove old pre-req directories and files not accessed for 3 months."
removeOldDirectoriesAndFiles
${
LOCAL_PREREQS_CACHE
}
90
;
removeOldDirectoriesAndFiles
${
LOCAL_PREREQS_CACHE
}
90
;
echo
;
echo
"INFO: Checking to remove old basebuilders not accessed for 3 months."
echo
"INFO: Checking to remove old basebuilders not accessed for 3 months."
removeOldDirectories
${
BASE_BUILDERS
}
90
;
removeOldDirectories
${
BASE_BUILDERS
}
90
;
This diff is collapsed.
Click to expand it.
releng.control/removeUtils.shsource
+
8
−
8
View file @
e2c12572
...
@@ -22,15 +22,15 @@ function removeIf ()
...
@@ -22,15 +22,15 @@ function removeIf ()
cd
$foundDirectory
cd
$foundDirectory
rm
-fr
$foundDirectory
rm
-fr
$foundDirectory
rc
=
$?
rc
ode
=
$?
if
[
$rc
-eq
0
]
if
[
$rc
ode
-eq
0
]
then
then
echo
" removed:
$foundDirectory
"
;
echo
" removed:
$foundDirectory
"
;
else
else
echo
"WARNING: r
c
: "
$rc
" could not remove "
$foundDirectory
;
echo
"WARNING: r
m returned non zero return code
: "
$rc
code
"
.
could not remove "
$foundDirectory
;
fi
fi
return
$rc
;
return
$rc
ode
;
}
}
# function that can remove a directory (e.g. via find) but checks to make sure not to remove the last one (or, last 'saveAtLeast')
# function that can remove a directory (e.g. via find) but checks to make sure not to remove the last one (or, last 'saveAtLeast')
...
@@ -82,14 +82,14 @@ function removeArtifactsDirIf ()
...
@@ -82,14 +82,14 @@ function removeArtifactsDirIf ()
fi
fi
rm
-fr
$foundDirectory
rm
-fr
$foundDirectory
rc
=
$?
rc
ode
=
$?
if
[
$rc
-eq
0
]
if
[
$rc
ode
-eq
0
]
then
then
echo
" removed:
$foundDirectory
"
;
echo
" removed:
$foundDirectory
"
;
else
else
echo
"WARNING: r
c
: "
$rc
". could not remove "
$foundDirectory
;
echo
"WARNING: r
m returned non zero return code
: "
$rc
code
". could not remove "
$foundDirectory
;
fi
fi
return
$rc
;
return
$rc
ode
;
}
}
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