jjb: xci: Do not wipe clean VM on failures 15/62315/2
authorMarkos Chandras <mchandras@suse.de>
Fri, 14 Sep 2018 11:13:05 +0000 (12:13 +0100)
committerMarkos Chandras <mchandras@suse.de>
Fri, 14 Sep 2018 15:59:59 +0000 (16:59 +0100)
If there is a CI failure, then we need the VM to be present so we can
ssh to the slave and collect all the logs we can in order to debug
the problem. However, in order to not leave stale VMs around, we should
remove the VM if a job is scheduled again on the same node. As such, if
we need to debug a build on the node, we need to disconnect the node
from Jenkins so the VM is not wiped by a future job.

Change-Id: I93e7d7402fe03c392b63b87e7d438191f6e7e9cc
Signed-off-by: Markos Chandras <mchandras@suse.de>
jjb/xci/xci-verify-jobs.yaml

index 020ec8b..c5badc6 100644 (file)
           description: 'Git URL to use on this Jenkins Slave'
 
     builders:
+      - 'xci-verify-clean-vm-macro'
       - 'xci-verify-set-scenario-macro'
       - inject:
           properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties"
             - role: BOTH
               build-on:
                 - ABORTED
-                - FAILURE
                 - NOT_BUILT
                 - SUCCESS
                 - UNSTABLE
 # -------------------------------
 # builder macros
 # -------------------------------
+- builder:
+    name: 'xci-verify-clean-vm-macro'
+    builders:
+      - shell:
+          !include-raw: ./xci-cleanup.sh
+
 - builder:
     name: 'xci-verify-set-scenario-macro'
     builders: