Put cached files in old/ dirs too
Previously because files in the cache were moved and the new/ workspaces were configured first none of the cached files ended up in old/ workspaces. Make it possible to copy the cache the first time around so that the second time through we can do the mv and get all of the files. Change-Id: I4f41e3ebbde85a27515c5bd27f6a4c706ffe9bb4
This commit is contained in:
@@ -292,7 +292,7 @@ tsfilter setup_host &> $WORKSPACE/logs/devstack-gate-setup-host.txt
|
||||
if [ "$DEVSTACK_GATE_GRENADE" -eq "1" -o "$DEVSTACK_GATE_GRENADE_FORWARD" -eq "1" ]; then
|
||||
echo "Setting up the new (migrate to) workspace"
|
||||
echo "... this takes 3 - 5 minutes (logs at logs/devstack-gate-setup-workspace-new.txt.gz)"
|
||||
tsfilter setup_workspace $GRENADE_NEW_BRANCH $BASE/new &> \
|
||||
tsfilter setup_workspace $GRENADE_NEW_BRANCH $BASE/new copycache &> \
|
||||
$WORKSPACE/logs/devstack-gate-setup-workspace-new.txt
|
||||
echo "Setting up the old (migrate from) workspace ..."
|
||||
echo "... this takes 3 - 5 minutes (logs at logs/devstack-gate-setup-workspace-old.txt.gz)"
|
||||
|
||||
13
functions.sh
13
functions.sh
@@ -271,6 +271,7 @@ function re_exec_devstack_gate {
|
||||
function setup_workspace {
|
||||
local base_branch=$1
|
||||
local DEST=$2
|
||||
local copy_cache=$3
|
||||
local xtrace=$(set +o | grep xtrace)
|
||||
|
||||
# Enabled detailed logging, since output of this function is redirected
|
||||
@@ -298,9 +299,15 @@ function setup_workspace {
|
||||
# It's important we are back at DEST for the rest of the script
|
||||
cd $DEST
|
||||
|
||||
# The vm template update job should cache some images in ~/cache.
|
||||
# Move them to where devstack expects:
|
||||
find ~/cache/files/ -mindepth 1 -maxdepth 1 -exec mv {} $DEST/devstack/files/ \;
|
||||
if [ -n "$copy_cache" ] ; then
|
||||
# The vm template update job should cache some images in ~/cache.
|
||||
# Move them to where devstack expects:
|
||||
find ~/cache/files/ -mindepth 1 -maxdepth 1 -exec cp {} $DEST/devstack/files/ \;
|
||||
else
|
||||
# The vm template update job should cache some images in ~/cache.
|
||||
# Move them to where devstack expects:
|
||||
find ~/cache/files/ -mindepth 1 -maxdepth 1 -exec mv {} $DEST/devstack/files/ \;
|
||||
fi
|
||||
|
||||
# Disable detailed logging as we return to the main script
|
||||
$xtrace
|
||||
|
||||
Reference in New Issue
Block a user