Commits

dready committed f728082

option to clean kitchen if job succeeded

  • Participants
  • Parent commits ccff446

Comments (0)

Files changed (2)

File src/worker/run_worker.py

             worker.download_build_package()
             worker.execute_task()
             worker.post_result()
-            if not options.keep_builds:
+            if not options.keep_builds or (worker.success and options.keep_builds is "failed"):
                 worker.clean()
     
 
                 worker.execute_task()
                 logging.debug("Worker post the result")
                 worker.post_result()
-                if not options.keep_builds:
+                if not options.keep_builds or (worker.success and options.keep_builds is "failed"):
                     logging.debug("Worker clean the kitchen after the build")
                     worker.clean()
 

File src/worker/settings.py

 FABRIC_FACTORY_URL = "http://127.0.0.1:8000/factory/build/oldest_not_executed/"
 WORKER_PATH = os.path.dirname(os.path.normpath(__file__))
 WORKER_KITCHEN = os.path.join(WORKER_PATH, "kitchen")
-WORKER_KEEP_BUILDS = True
+WORKER_KEEP_BUILDS = "failed"
 
 
 ##################################################