Merge "Ensure we fail packer jobs if any step fails"
[releng/builder.git] / packer / provision / robot.sh
index 268d6c24f7d94b3b940d253b14baee5d4668c5a0..13bfa219ea3fe5a895d794f7ed26b207ce020b29 100644 (file)
@@ -2,10 +2,20 @@
 
 # vim: sw=4 ts=4 sts=4 et tw=72 :
 
+# force any errors to cause the script and job to end in failure
+set -xeu -o pipefail
+
 # Install minimal python requirements to get virtualenv going
 # Additional python dependencies should be installed via JJB configuration
 # inside project jobs using a virtualenv setup.
-yum install -y python-{devel,setuptools,virtualenv} @development
+yum install -y @development \
+    python-devel \
+    python-setuptools \
+    python-virtualenv
+
+# TODO: Move docker-py and netaddr to virtualenv in the csit jobs.
+yum install -y python-docker-py \
+    python-netaddr
 
 # Install dependencies for robotframework and robotframework-sshlibrary
 # installed elsewhere
@@ -35,6 +45,9 @@ cd udpreplay
 ./configure
 make &> /dev/null && cp udpreplay /usr/local/bin
 
+## Install docker-py and netaddr
+yum install -y -q python-docker-py python-netaddr
+
 #####################
 # DLUX requirements #
 #####################