aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2018-05-21 17:35:34 +0200
committerMartin Stockhammer <martin_s@apache.org>2018-05-21 17:35:34 +0200
commit5fcce410ec8024d24592a463bf04d16208de8f6d (patch)
tree611b5e296aa061c7635ac06ad0f7960845e5ae60
parent3f81c46ba09615f11646ce8dcffe12c6f7632196 (diff)
downloadarchiva-5fcce410ec8024d24592a463bf04d16208de8f6d.tar.gz
archiva-5fcce410ec8024d24592a463bf04d16208de8f6d.zip
Improving cleanup
-rw-r--r--Jenkinsfile-itest2
-rw-r--r--src/ci/scripts/prepareWorkspace.sh17
2 files changed, 18 insertions, 1 deletions
diff --git a/Jenkinsfile-itest b/Jenkinsfile-itest
index 72cde919f..943f407d0 100644
--- a/Jenkinsfile-itest
+++ b/Jenkinsfile-itest
@@ -66,7 +66,7 @@ pipeline {
)
{
sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh"
- sh "./src/ci/scripts/prepareWorkspace.sh"
+ sh "./src/ci/scripts/prepareWorkspace.sh -d '.repository'"
// Needs a lot of time to reload the repository files, try without cleanup
// Not sure, but maybe
// sh "rm -rf .repository"
diff --git a/src/ci/scripts/prepareWorkspace.sh b/src/ci/scripts/prepareWorkspace.sh
index b79cd4457..d0f45bb68 100644
--- a/src/ci/scripts/prepareWorkspace.sh
+++ b/src/ci/scripts/prepareWorkspace.sh
@@ -25,6 +25,23 @@
ATTIC_DIRS="archiva-modules/archiva-base/archiva-indexer"
REMOVE_DIRS=".indexer"
+while [ ! -z "$1" ]; do
+ case "$1" in
+ -d)
+ shift
+ REPO_DIR=$1
+ shift
+ ;;
+ *)
+ shift
+ ;;
+ esac
+done
+
+if [ -d "${REPO_DIR}" ]; then
+ rm -rf "${REPO_DIR}"
+fi
+
for i in ${ATTIC_DIRS}; do
if [ "X${i}" != "X" -a -d ${i} ]; then
echo "Deleting directory ${i}"