Merge "Fix upload-swift-artifacts for old OSclient"

This commit is contained in:
Jenkins 2016-09-28 15:03:29 +00:00 committed by Gerrit Code Review
commit f9bd99c063
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ swift post "$CONTAINER_NAME"
SWIFT_ACCOUNT=$(swift stat "$CONTAINER_NAME" 2>/dev/null | grep Account: | sed -e "s|.*Account..||")
# This works with newer openstackclient which displays the endpoints in list
SWIFT_INTERNAL_URL=$(openstack endpoint list | grep swift | grep internal | sed -e "s|.*\(http.*\)://\([^/]*\)/.*|\1://\2|")
SWIFT_INTERNAL_URL=$(openstack endpoint list | grep swift | grep internal | sed -e "s|.*\(http.*\)://\([^/]*\)/.*|\1://\2|" || true)
if [ -z "$SWIFT_INTERNAL_URL" ]; then
# fallback to old openstack client 'show' which displays all the URLs