Gathering pod, chart and image information from the cluster for HW jobs
Change-Id: Ie277968be8ea7b8b17c28905482c02c84eecb0fe
diff --git a/jjb/pipeline/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha-physical-functional-tests.groovy
index 09e8c45..1c561be 100644
--- a/jjb/pipeline/voltha-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha-physical-functional-tests.groovy
@@ -283,6 +283,15 @@
gzip *-combined.log || true
rm *-combined.log || true
+ # store information on running charts
+ helm ls > $WORKSPACE/helm-list.txt || true
+
+ # store information on the running pods
+ kubectl get pods -o wide > $WORKSPACE/pods.txt || true
+ kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee $WORKSPACE/pod-images.txt || true
+ kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee $WORKSPACE/pod-imagesId.txt || true
+
+
# collect ETCD cluster logs
mkdir -p $WORKSPACE/etcd
printf '%s\n' $(kubectl get pods -l app=etcd -o=jsonpath="{.items[*]['metadata.name']}") | xargs -I% bash -c "kubectl logs % > $WORKSPACE/etcd/%.log"