Log archiving for functional tests 82/11682/4
authorPeter Mikus <pmikus@cisco.com>
Wed, 11 Apr 2018 14:41:44 +0000 (14:41 +0000)
committerPeter Mikus <pmikus@cisco.com>
Mon, 16 Apr 2018 05:10:55 +0000 (05:10 +0000)
- Adding log archiving to logs.fd.io for functional tests.

Change-Id: Ie36021840d58d9b1fba1f78a6940a9fe39875943
Signed-off-by: Peter Mikus <pmikus@cisco.com>
bootstrap-vpp-verify-semiweekly.sh

index 070dca2..fa0c30b 100644 (file)
@@ -23,7 +23,12 @@ cat /etc/hosts
 
 PYBOT_ARGS="--noncritical MULTI_THREAD"
 
-ARCHIVE_ARTIFACTS=(log.html output.xml report.html)
+JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html)
+LOG_ARCHIVE_ARTIFACTS=(log.html output.xml report.html)
+JOB_ARCHIVE_DIR="archive"
+LOG_ARCHIVE_DIR="$WORKSPACE/archives"
+mkdir -p ${JOB_ARCHIVE_DIR}
+mkdir -p ${LOG_ARCHIVE_DIR}
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 export PYTHONPATH=${SCRIPT_DIR}
@@ -356,10 +361,13 @@ rebot --noncritical EXPECTED_FAILING \
 # Remove unnecessary files
 rm -f ${partial_logs}
 
-# Archive artifacts
-mkdir archive
-for i in ${ARCHIVE_ARTIFACTS[@]}; do
-    cp $( readlink -f ${i} | tr '\n' ' ' ) archive/
+# Archive JOB artifacts in jenkins
+for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do
+    cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/
+done
+# Archive JOB artifacts to logs.fd.io
+for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do
+    cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/
 done
 
 echo Post-processing finished.

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.