X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Finclude-raw-integration-compare-distributions.sh;h=af4d2e8826673e7f014791c95f7b8f679e8bcc5e;hb=190f9a3e4e36bfbb01d02e640f8cb6dc05202382;hp=ecd77675f6d7159bc0b57d801921191173d2d29c;hpb=fdfdf9a3820b1599b777ed675adb09cb46cd77b3;p=releng%2Fbuilder.git diff --git a/jjb/integration/include-raw-integration-compare-distributions.sh b/jjb/integration/include-raw-integration-compare-distributions.sh index ecd77675f..af4d2e882 100644 --- a/jjb/integration/include-raw-integration-compare-distributions.sh +++ b/jjb/integration/include-raw-integration-compare-distributions.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Depends on variables created and published from the get-bundle-vars script +# Depends on variables created and published from the integration-set-variables script # Do not fail the build if there is trouble trying to collect distribution patch diffs set +e @@ -16,7 +16,7 @@ wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f BUNDLEVERSION=$(xpath pom.xml '/project/version/text()' 2> /dev/null) echo "Bundle version is ${BUNDLEVERSION}" # Acquire the timestamp information from maven-metadata.xml -NEXUSPATH="${NEXUSURL_PREFIX}/${ODL_NEXUS_REPO}/org/opendaylight/integration/distribution-karaf" +NEXUSPATH="${NEXUSURL_PREFIX}/${ODL_NEXUS_REPO}/org/opendaylight/integration/${KARAF_ARTIFACT}" wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml if [ $? -ne 0 ]; then @@ -27,19 +27,19 @@ fi less maven-metadata.xml TIMESTAMP=$(xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null) echo "Nexus timestamp is ${TIMESTAMP}" -BUNDLEFOLDER="distribution-karaf-${BUNDLEVERSION}" -BUNDLE="distribution-karaf-${TIMESTAMP}.zip" -ACTUALBUNDLEURL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}" +BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLEVERSION}" +BUNDLE="${KARAF_ARTIFACT}-${TIMESTAMP}.zip" +ACTUAL_BUNDLE_URL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}" -wget --progress=dot:mega $ACTUALBUNDLEURL +wget --progress=dot:mega $ACTUAL_BUNDLE_URL echo "Extracting the last distribution found on nexus..." unzip -q $BUNDLE mv $BUNDLEFOLDER /tmp/distro_old rm $BUNDLE echo "Extracting the distribution just created by this job..." -NEW_DISTRO=$(find $WORKSPACE -name distribution-karaf*.zip) -NEW_DISTRO_BASENAME=$(basename $NEW_DISTRO) +NEW_DISTRO="$(find $WORKSPACE -name ${KARAF_ARTIFACT}*.zip)" +NEW_DISTRO_BASENAME="$(basename "$NEW_DISTRO")" cp $NEW_DISTRO /tmp/ cd /tmp/ # get the name of the folder which will be extracted to @@ -54,5 +54,5 @@ mkdir -p $WORKSPACE/archives # The file/report to be archived will only list the distribution in the comparison and the patches that # are different. python distcompare.py -r ssh://jenkins-$SILO@git.opendaylight.org:29418 | tee /tmp/dist_diff.txt -echo -e "Patch differences listed are in comparison to:\n\t$ACTUALBUNDLEURL\n\n" > $WORKSPACE/archives/distribution_differences.txt +echo -e "Patch differences listed are in comparison to:\n\t$ACTUAL_BUNDLE_URL\n\n" > $WORKSPACE/archives/distribution_differences.txt sed -ne '/Patch differences/,$ p' /tmp/dist_diff.txt >> $WORKSPACE/archives/distribution_differences.txt