Merge "Update cloud image CentOS7 helm x86_64"
[releng/builder.git] / jjb / integration / integration-upload-distribution.sh
index 07bba5e61308dda7d9b44aa06dceea089cfbb3dd..7b09aa1f32607eaa0a09664bdea319f9594b80ec 100644 (file)
@@ -1,7 +1,9 @@
 #!/bin/bash
 set -xeu -o pipefail
 
-BUNDLE_VERSION=$(xpath "${BUNDLE_POM}" '/project/version/text()' 2> /dev/null)
+# TODO: remove the second xpath command once the old version in CentOS 7 is not used any more
+BUNDLE_VERSION=$(xpath -e '/project/version/text()' "${BUNDLE_POM}" 2>/dev/null ||
+        xpath "${BUNDLE_POM}" '/project/version/text()' 2>/dev/null)
 BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLE_VERSION}"
 BUNDLE="${BUNDLEFOLDER}.zip"
 BUNDLE_PATH="/tmp/r/org/opendaylight/${KARAF_PROJECT}/${KARAF_ARTIFACT}/${BUNDLE_VERSION}/${BUNDLE}"