Clean up Ubuntu arm build machines
authorBruce Forstall <brucefo@microsoft.com>
Mon, 16 Apr 2018 18:09:06 +0000 (11:09 -0700)
committerBruce Forstall <brucefo@microsoft.com>
Mon, 16 Apr 2018 18:09:06 +0000 (11:09 -0700)
netci.groovy

index 424ecbe..cb6ab4e 100755 (executable)
@@ -2419,6 +2419,17 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
                     buildCommands += "zip -r testnativebin.${lowerConfiguration}.zip ./bin/obj/Linux.arm.${configuration}/tests"
 
                     Utilities.addArchival(newJob, "coreroot.${lowerConfiguration}.zip,testnativebin.${lowerConfiguration}.zip", "")
+
+                    // We need to clean up the build machines; the docker build leaves newly built files with root permission, which
+                    // the cleanup task in Jenkins can't remove.
+                    newJob.with {
+                        publishers {
+                            azureVMAgentPostBuildAction {
+                                agentPostBuildAction('Delete agent after build execution (when idle).')
+                            }
+                        }
+                    }
+
                     break
                 default:
                     println("Unknown architecture: ${architecture}");