Add publishers to SiaB job to email on failure and archive logs

Change-Id: I959b00561a346ae004ca7d7e67860dde4966218a
diff --git a/jjb/siab-e2e.yaml b/jjb/siab-e2e.yaml
index ba19cf2..589773f 100644
--- a/jjb/siab-e2e.yaml
+++ b/jjb/siab-e2e.yaml
@@ -5,7 +5,7 @@
     build-node: 'qct-pod4-node2'
     branch: 'master'
     refspec: 'refs/heads/master'
-
+    failure-email-address: 'andy@opennetworking.org'
     timed-trigger: '{every-four-hours}'
     jobs:
       - 'siab-e2e-att'
@@ -52,3 +52,31 @@
           [ -e /usr/bin/kubeadm ] && make reset-kubeadm
           make -j2
           make run-tests
+
+    publishers:
+      - email:
+          recipients: '{failure-email-address}'
+      - postbuildscript:
+          builders:
+            - role: SLAVE
+              build-on:
+                - SUCCESS
+                - UNSTABLE
+                - NOT_BUILT
+                - ABORTED
+                - FAILURE
+              build-steps:
+                - shell: sudo rm -rf /tmp/logs/*
+            - role: SLAVE
+              build-on:
+                - FAILURE
+              build-steps:
+                - shell: |
+                    #!/usr/bin/env bash
+
+                    mkdir -p /tmp/logs
+                    sudo cp /var/log/containers/*.log /tmp/logs
+                    sudo chown cord /tmp/logs/*.log
+      - archive:
+          artifacts: '/tmp/logs/*.log'
+          allow-empty: true