dready avatar dready committed f728082

option to clean kitchen if job succeeded

Comments (0)

Files changed (2)

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()
 

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"
 
 
 ##################################################
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.