summaryrefslogtreecommitdiffstats
path: root/fuel/ci
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2015-04-09 15:23:35 +0200
committerJonas Bjurel <jonas.bjurel@ericsson.com>2015-04-09 15:40:38 +0200
commit3525d52f2dc83ce3f4675004a49616c9d621cef8 (patch)
tree96a9f12449080862593195d1fc265d0bdf434043 /fuel/ci
parentd83bb1225f836315cab4bddc15fc6a5f3629b161 (diff)
Changed place for cache tmp storage due to /tmp full in LF
Fixed issue with creating tmp dir JIRA: Change-Id: I96e3f88159e09a3148f23cb0fc2969adc9d90c1a Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
Diffstat (limited to 'fuel/ci')
-rwxr-xr-xfuel/ci/build.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/fuel/ci/build.sh b/fuel/ci/build.sh
index cdaa6ef..afdcab5 100755
--- a/fuel/ci/build.sh
+++ b/fuel/ci/build.sh
@@ -99,6 +99,7 @@ INCLUDE_DIR=../include
#
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
LOCK_FILE="${SCRIPT_DIR}/.build.lck"
+CACHE_TMP="${SCRIPT_DIR}/tmp"
TEST_SUCCEED=0
TEST_FAIL=0
UNIT_TEST=0
@@ -283,11 +284,11 @@ echo $$ > ${LOCK_FILE}
if [ ! -z ${BUILD_CACHE_URI} ]; then
if [ ${POPULATE_CACHE} -ne 1 ]; then
- rm -rf /tmp/cache
- mkdir /tmp/cache
+ rm -rf ${CACHE_TMP}/cache
+ mkdir -p ${CACHE_TMP}/cache
echo "Downloading cach file ${BUILD_CACHE_URI}/${REMOTE_CACHE_ARCH_NAME} ..."
set +e
- ${REMOTE_ACCESS_METHD} -o /tmp/cache/${LOCAL_CACHE_ARCH_NAME}.tgz ${BUILD_CACHE_URI}/${REMOTE_CACHE_ARCH_NAME}.tgz
+ ${REMOTE_ACCESS_METHD} -o ${CACHE_TMP}/cache/${LOCAL_CACHE_ARCH_NAME}.tgz ${BUILD_CACHE_URI}/${REMOTE_CACHE_ARCH_NAME}.tgz
rc=$?
set -e
if [ $rc -ne 0 ]; then
@@ -295,8 +296,8 @@ if [ ! -z ${BUILD_CACHE_URI} ]; then
POPULATE_CACHE=1
else
echo "Unpacking cache file ..."
- tar -C /tmp/cache -xvf /tmp/cache/${LOCAL_CACHE_ARCH_NAME}.tgz
- cp /tmp/cache/cache/.versions ${BUILD_BASE}/.
+ tar -C ${CACHE_TMP}/cache -xvf ${CACHE_TMP}/cache/${LOCAL_CACHE_ARCH_NAME}.tgz
+ cp ${CACHE_TMP}/cache/cache/.versions ${BUILD_BASE}/.
set +e
make -C ${BUILD_BASE} validate-cache;
rc=$?
@@ -306,9 +307,9 @@ if [ ! -z ${BUILD_CACHE_URI} ]; then
echo "Cache invalid - a new cache will be built "
POPULATE_CACHE=1
else
- cp -rf /tmp/cache/cache/. ${BUILD_BASE}
+ cp -rf ${CACHE_TMP}/cache/cache/. ${BUILD_BASE}
fi
- rm -rf /tmp/cache
+ rm -rf ${CACHE_TMP}/cache
fi
fi
fi