Fix for building on CentOS
[releng.git] / jjb / yardstick / yardstick.yml
index ac1442d..a961903 100644 (file)
             # TODO: This should maybe go into openrc instead!?
             export OS_IMAGE_API_VERSION=1
 
+            # Install required packages. 
+            # 'libguestfs-tools' is needed when building the yardstick image.
+            sudo yum -y install libguestfs-tools
+
             # set virtualenv
             echo "Yardstick: setup virtualenv"
             cd $WORKSPACE
             IMAGE_NAMES[1]=yardstick-trusty-server
             if ! nova image-show ${IMAGE_NAMES[1]} > /dev/null 2>&1; then
                 echo "Image ${IMAGE_NAMES[1]} doesn't exist. Creating image ${IMAGE_NAMES[1]}"
-                sudo yardstick-img-modify $WORKSPACE/tools/ubuntu-server-cloudimg-modify.sh
+                sudo $(which yardstick-img-modify) $WORKSPACE/tools/ubuntu-server-cloudimg-modify.sh
                 glance image-create --name yardstick-trusty-server --is-public true --disk-format qcow2 --container-format bare --file $WORKSPACE/yardstick-trusty-server.img
             fi