[VOL-3094] Run onos-diagnostics tool to collect log from onos
Change-Id: I2630c0182df9ec7786e74bad67b4d141d5ef8af7
diff --git a/jjb/pipeline/voltha-nightly-tests-bbsim.groovy b/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
index f01a024..c6662c0 100644
--- a/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
+++ b/jjb/pipeline/voltha-nightly-tests-bbsim.groovy
@@ -196,6 +196,14 @@
cd $WORKSPACE
gzip *-combined.log || true
+ ## Collect ONOS log
+ wget https://raw.githubusercontent.com/opennetworkinglab/onos/master/tools/package/runtime/bin/onos-diagnostics-k8s
+ wget https://raw.githubusercontent.com/opennetworkinglab/onos/master/tools/package/runtime/bin/onos-diagnostics-profile
+ chmod 755 onos-diagnostics-k8s
+ pod_name=$(kubectl get pods -lapp=onos-onos-classic -o name | cut -d '/' -f2 | tr '\n' ' ')
+ ./onos-diagnostics-k8s -k karaf ${pod_names}
+ cp /tmp/onos-diags.tar.gz $WORKSPACE/onos-diags.tar.gz
+
## shut down voltha but leave kind-voltha cluster
cd $HOME/kind-voltha/
DEPLOY_K8S=n WAIT_ON_DOWN=y ./voltha down