From 35f6dccee0e0ce710bcb975a311e7d5ba6d72405 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 6 Jun 2012 16:20:32 -0700 Subject: [PATCH] Fix git repo cache. Change-Id: I600bd3bd398ad2ce5e403491328d630a5f11b9c8 --- devstack-vm-gate-wrap.sh | 4 ++++ devstack-vm-update-image.py | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index a3741b13..aeb54726 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -45,6 +45,10 @@ fi cd $WORKSPACE +if [[ -e ~/workspace-cache/nova ]]; then + mv ~/workspace-cache/* $WORKSPACE/ +fi + ORIGINAL_GERRIT_PROJECT=GERRIT_PROJECT ORIGINAL_GERRIT_BRANCH=GERRIT_BRANCH diff --git a/devstack-vm-update-image.py b/devstack-vm-update-image.py index e318b4ca..933f4987 100755 --- a/devstack-vm-update-image.py +++ b/devstack-vm-update-image.py @@ -176,12 +176,12 @@ def configure_server(server, branches): client.ssh('download image %s' % fname, 'wget -c %s -O ~/cache/files/%s' % (url, fname)) - client.ssh('clear workspace', 'rm -rf ~/workspace') - client.ssh('make workspace', 'mkdir -p ~/workspace') + client.ssh('clear workspace', 'rm -rf ~/workspace-cache') + client.ssh('make workspace', 'mkdir -p ~/workspace-cache') for project in PROJECTS: sp = project.split('/')[0] client.ssh('clone %s' % project, - 'cd ~/workspace && git clone https://review.openstack.org/p/%s' % project) + 'cd ~/workspace-cache && git clone https://review.openstack.org/p/%s' % project) script = os.environ.get('DEVSTACK_GATE_CUSTOM_SCRIPT', '') if script and os.path.isfile(script):