archiving kube pod logs during post execution

Change-Id: I699ed6ad1687d7b72e70f5c6c0b16fe291ce36ed
diff --git a/jjb/pipeline/chart-api-test-helm.groovy b/jjb/pipeline/chart-api-test-helm.groovy
index 627910c..e3a5d73 100644
--- a/jjb/pipeline/chart-api-test-helm.groovy
+++ b/jjb/pipeline/chart-api-test-helm.groovy
@@ -269,6 +269,11 @@
   post {
     always {
       sh '''
+         for pod in \$(kubectl get pods --no-headers | awk '{print \$1}');
+         do
+           kubectl logs \$pod > $WORKSPACE/\$pod.log;
+         done
+
          kubectl get pods --all-namespaces
 
          echo "# removing helm deployments"
@@ -283,6 +288,7 @@
 
          sudo minikube delete
          '''
+         archiveArtifacts artifacts: '*.log'
          step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "suchitra@opennetworking.org, you@opennetworking.org, kailash@opennetworking.org", sendToIndividuals: false])
     }
   }