Browse code

Cache UEC image earlier

Dean Troyer authored on 2011/11/06 06:16:54
Showing 1 changed files
... ...
@@ -167,6 +167,15 @@ git_clone $KEYSTONE_REPO $COPY_DIR/$DEST/keystone $KEYSTONE_BRANCH
167 167
 git_clone $NOVNC_REPO $COPY_DIR/$DEST/noVNC $NOVNC_BRANCH
168 168
 git_clone $CITEST_REPO $COPY_DIR/$DEST/openstack-integration-tests $CITEST_BRANCH
169 169
 
170
+# Pre-load an image for testing
171
+UEC_NAME=$DIST_NAME-server-cloudimg-amd64
172
+CIVMDIR=${COPY_DIR}${DEST}/openstack-integration-tests/include/sample_vm
173
+if [ ! -e $CIVMDIR/$UEC_NAME.tar.gz ]; then
174
+    mkdir -p $CIVMDIR
175
+    (cd $CIVMDIR && wget -N http://uec-images.ubuntu.com/$DIST_NAME/current/$UEC_NAME.tar.gz;
176
+        tar xzf $UEC_NAME.tar.gz;)
177
+fi
178
+
170 179
 # Back to devstack
171 180
 cd $TOP_DIR
172 181
 
... ...
@@ -410,15 +419,6 @@ umount $ROOTFS/dev
410 410
 chroot $ROOTFS dpkg-reconfigure openssh-server
411 411
 sed -e 's/^PasswordAuthentication.*$/PasswordAuthentication yes/' -i $ROOTFS/etc/ssh/sshd_config
412 412
 
413
-# Pre-load an image for testing
414
-UEC_NAME=$DIST_NAME-server-cloudimg-amd64
415
-CIVMDIR=${ROOTFS}${DEST}/openstack-integration-tests/include/sample_vm
416
-if [ ! -e $CIVMDIR/$UEC_NAME.tar.gz ]; then
417
-    mkdir -p $CIVMDIR
418
-    (cd $CIVMDIR && wget -N http://uec-images.ubuntu.com/$DIST_NAME/current/$UEC_NAME.tar.gz;
419
-        tar xzf $UEC_NAME.tar.gz;)
420
-fi
421
-
422 413
 # Unmount
423 414
 umount $ROOTFS || echo 'ok'
424 415
 ROOTFS=""