Remove unused views
[releng/builder.git] / jjb / opendaylight-infra-stack.sh
index 0659504abc0fd2b416357dafd047d71e83c93cb9..e1e398ab05395f568510efa5272ed674a5979ed8 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,15 @@
 # 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
 
-cd /builder/openstack-hot || exit 1
+# openstack cli is failing with the decorator package
+sudo pip install --upgrade --quiet decorator
 
 JOB_SUM=$(echo "$JOB_NAME" | sum | awk '{{ print $1 }}')
 VM_NAME="$JOB_SUM-$BUILD_NUMBER"
@@ -48,6 +48,7 @@ for try in $(seq $STACK_RETRIES); do
             CREATE_FAILED)
                 reason=$(openstack stack show "$STACK_NAME" -f value -c stack_status_reason)
                 echo "ERROR: Failed to initialize infrastructure. Reason: $reason"
+                openstack stack resource list -n 25 "$STACK_NAME"
 
                 echo "Deleting stack and possibly retrying to create..."
                 openstack stack delete --yes "$STACK_NAME"