Repository: archiva-redback-core
Updated Branches:
  refs/heads/master daa787d71 -> d33134ba3


Change workspace cleanup to prebuild step


Project: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/archiva-redback-core/commit/d33134ba
Tree: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/tree/d33134ba
Diff: http://git-wip-us.apache.org/repos/asf/archiva-redback-core/diff/d33134ba

Branch: refs/heads/master
Commit: d33134ba32472c50209f68e58807e862746f07ab
Parents: daa787d
Author: Martin Stockhammer <[email protected]>
Authored: Wed May 24 23:25:57 2017 +0200
Committer: Martin Stockhammer <[email protected]>
Committed: Wed May 24 23:25:57 2017 +0200

----------------------------------------------------------------------
 src/ci/env/build-info.txt          |  1 -
 src/ci/scripts/prepareWorkspace.sh | 37 ++++++++++-----------------------
 2 files changed, 11 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva-redback-core/blob/d33134ba/src/ci/env/build-info.txt
----------------------------------------------------------------------
diff --git a/src/ci/env/build-info.txt b/src/ci/env/build-info.txt
deleted file mode 100644
index 51bc15b..0000000
--- a/src/ci/env/build-info.txt
+++ /dev/null
@@ -1 +0,0 @@
-CIBUILD=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva-redback-core/blob/d33134ba/src/ci/scripts/prepareWorkspace.sh
----------------------------------------------------------------------
diff --git a/src/ci/scripts/prepareWorkspace.sh 
b/src/ci/scripts/prepareWorkspace.sh
index b3af7f3..88b5e80 100644
--- a/src/ci/scripts/prepareWorkspace.sh
+++ b/src/ci/scripts/prepareWorkspace.sh
@@ -20,30 +20,15 @@
 #  Author: Martin Stockhammer <[email protected]>
 #  Date:   2017-05-24
 #
-#  Clears the workspace, if the build number is higher
-#  for automatic workspace cleanup on the build slaves
-#
-#  To request a workspace cleanup increase the number for CIBUILD
-#  in the file ../env/build-info.txt and
+#  Removes directories that are not used anymore.
+##
+ATTIC_DIRS="redback-common/redback-common-jdo \
+ redback-rbac/redback-rbac-providers/redback-rbac-jdo \
+ redback-users/redback-users-providers/redback-users-jdo \
+ redback-keys/redback-keys-providers/redback-keys-jdo"
 
-## 
-BUILDINFO_DIR=${WORKSPACE}/ci
-BUILDINFO_FILE=${BUILDINFO_DIR}/buildinfo.sh
-REQ_BUILDINFO_FILE=$(dirname $0)/../env/build-info.txt
-git checkout ${REQ_BUILDINFO_FILE}
-if [ -f ${REQ_BUILDINFO_FILE} ]; then
-  . ${REQ_BUILDINFO_FILE}
-else
-  CIBUILD=0
-fi
-REQUESTED_BUILD=${CIBUILD}
-CIBUILD=0
-if [ -f ${BUILDINFO_FILE} ]; then
-  . ${BUILDINFO_FILE}
-fi
-if [ ${CIBUILD} -lt ${REQUESTED_BUILD} ]; then
-  echo "Clearing workspace"
-  rm -rf ${WORKSPACE}/*
-  mkdir -p ${BUILDINFO_DIR}
-  echo "CIBUILD=${REQUESTED_BUILD}" >${BUILDINFO_FILE}
-fi
+for i in ${ATTIC_DIRS}; do
+ if [ "X${i}" != "X" -a -d ${i} ]; then
+   rm -rf ${i}
+ fi
+done

Reply via email to