Merge "Update cloud image Ubuntu18.04 mininet ovs"
[releng/builder.git] / jjb / opendaylight-infra-stack.sh
index b3afb0481f55f737e338a0c78e8dba94b989a7c9..2a3e0cee5881477660daeab66e597321bcc54d88 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
@@ -9,15 +9,22 @@
 # http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 
-virtualenv "/tmp/v/openstack"
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
-pip install --upgrade pip
-pip install --upgrade python-openstackclient python-heatclient
-pip install --upgrade pipdeptree
-pipdeptree
+# TODO: Remove the if-statement once we have fully migrated to /opt/ciman
+if [ -d "/opt/ciman/openstack-hot" ]; then
+    cd /opt/ciman/openstack-hot || exit 1
+else
+    cd /builder/openstack-hot || exit 1
+fi
+
+# shellcheck disable=SC1090
+. ~/lf-env.sh
 
-cd /builder/openstack-hot || exit 1
+lf-activate-venv --python python3 \
+    decorator \
+    python-heatclient \
+    python-openstackclient \
+    python-magnumclient \
+    yq
 
 JOB_SUM=$(echo "$JOB_NAME" | sum | awk '{{ print $1 }}')
 VM_NAME="$JOB_SUM-$BUILD_NUMBER"