Fix version fetching for distribution-test job 73/43073/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 3 Aug 2016 17:51:56 +0000 (13:51 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 3 Aug 2016 17:51:58 +0000 (13:51 -0400)
Patch https://git.opendaylight.org/gerrit/41839/ introduced a new parent
causing the autorelease job to retrieve the wrong version string.

Change-Id: Ic7602b96c53c081c1b4b1d9edb6d747e5376880a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/autorelease/include-raw-autorelease-get-integration-test-variables.sh

index 38c8d798ae5d5af025909937ea1269f1c5e0e6a5..3f46582899f64d36e5a5022110329ba55c38cbd5 100644 (file)
@@ -10,7 +10,7 @@
 ##############################################################################
 
 NEXUSURL=https://nexus.opendaylight.org/content/repositories/
-VERSION=`grep -m1 '<version>' ${WORKSPACE}/integration/distribution/distribution-karaf/pom.xml | awk -F'[<|>]' '/version/ { printf $3 }'`
+VERSION=`grep -m2 '<version>' ${WORKSPACE}/integration/distribution/distribution-karaf/pom.xml | tail -n1 | awk -F'[<|>]' '/version/ { printf $3 }'`
 if [ "x${VERSION}" == "x" ]; then
     echo "Lithium or sooner, different path needs to be searched."
     VERSION=`grep -m1 '<version>' ${WORKSPACE}/integration/distribution/distributions/karaf/pom.xml | awk -F'[<|>]' '/version/ { printf $3 }'`