Merge "Adding simple checks examination of data/logs after robot suites"
[releng/builder.git] / jjb / integration / include-raw-integration-compare-distributions.sh
1 #!/bin/bash
2
3 # Depends on variables created and published from the get-bundle-vars script
4
5 # Do not fail the build if there is trouble trying to collect distribution patch diffs
6 set +e
7
8 wget --progress=dot:mega $ACTUALBUNDLEURL
9 echo "Extracting the last distribution found on nexus..."
10 unzip -q $BUNDLE
11 mv $BUNDLEFOLDER /tmp/distro_old
12
13 echo "Extracting the distribution just created by this job..."
14 NEW_DISTRO=$(find $WORKSPACE -name distribution-karaf*.zip)
15 NEW_DISTRO_BASENAME=$(basename $NEW_DISTRO)
16 cp $NEW_DISTRO /tmp/
17 cd /tmp/
18 # the following extracts the .zip and learns the name of the folder extracted to
19 EXTRACTED_FOLDER=$(unzip $NEW_DISTRO_BASENAME | grep -m1 'creating:' | cut -d' ' -f5-)
20 mv $EXTRACTED_FOLDER distro_new
21
22 git clone https://git.opendaylight.org/gerrit/p/integration/test.git
23 cd test/tools/distchanges
24 mkdir -p $WORKSPACE/archives
25
26 python distcompare.py -r ssh://jenkins-$SILO@git.opendaylight.org:29418 | tee $WORKSPACE/archives/dist_diff.txt
27 # TODO: the output of the above command is not *friendly* for the reader because the most important info
28 # is listed last. This is fine/best for command line output, but for keeping in a file it would be better
29 # to put the summary at the beginning of the file. Some bash magic can be done here to make that happen.