[Extras-cauldron-commits] r43 - in trunk/buildme: . tools

ed_ at garage.maemo.org ed_ at garage.maemo.org
Sun May 18 23:17:35 EEST 2008


Author: ed_
Date: 2008-05-18 23:17:30 +0300 (Sun, 18 May 2008)
New Revision: 43

Modified:
   trunk/buildme/TODO
   trunk/buildme/tools/buildme
   trunk/buildme/tools/buildme.conf
   trunk/buildme/tools/buildme.conf.debug
Log:
added buld url to the message

Modified: trunk/buildme/TODO
===================================================================
--- trunk/buildme/TODO	2008-05-18 19:25:10 UTC (rev 42)
+++ trunk/buildme/TODO	2008-05-18 20:17:30 UTC (rev 43)
@@ -1,3 +1,2 @@
-1. Add a link to the build results into the mail message
-2. Use build-order API to determine correct build order for packages
-3. Skip sources if their build dependencies are in the incoming queue
+1. Use build-order API to determine correct build order for packages
+2. Skip sources if their build dependencies are in the incoming queue

Modified: trunk/buildme/tools/buildme
===================================================================
--- trunk/buildme/tools/buildme	2008-05-18 19:25:10 UTC (rev 42)
+++ trunk/buildme/tools/buildme	2008-05-18 20:17:30 UTC (rev 43)
@@ -71,7 +71,7 @@
     if clean and os.path.exists(outd):
         shutil.rmtree(outd)
 
-    infras = {'logs':outd}
+    infras = {'logs': outd, 'build_dir': outd}
     
     for dname in ('sources', 'results'):
         dpath = os.path.join(outd, dname)
@@ -514,6 +514,19 @@
 
     return FSM.OK
 
+def footer(env):
+    """ Put footer to the logs """
+
+    conf = env.params['conf']
+    product = env.params['product']
+
+    build_dir = env.params['infras']['build_dir']
+    if os.path.exists(build_dir) and conf.has_option(product, 'result_url'):
+        url = env.params['conf'].get(product, 'result_url', False, {'product': product, 'build_dir': os.path.basename(build_dir)})
+        env.params['logger'].info("You can find more info about this build here: %s" % url)
+
+    return FSM.OK
+
 def main(argv, options, logger, conf):
     """ Main """
 
@@ -529,9 +542,10 @@
                 do_build      : {FSM.OK : copy_results},
                 copy_results  : {FSM.OK : check_build},
                 check_build   : {FSM.OK : iter_targets,   FSM.STOP : remove_sources},
-                remove_sources: {FSM.OK : sign_results,   FSM.STOP : None},
+                remove_sources: {FSM.OK : sign_results,   FSM.STOP : footer},
                 sign_results  : {FSM.OK : copy_to_queue},
-                copy_to_queue : {FSM.OK : None}
+                copy_to_queue : {FSM.OK : footer},
+                footer        : {FSM.OK : None}
                 },
         params = {
                 'argv'    : argv,

Modified: trunk/buildme/tools/buildme.conf
===================================================================
--- trunk/buildme/tools/buildme.conf	2008-05-18 19:25:10 UTC (rev 42)
+++ trunk/buildme/tools/buildme.conf	2008-05-18 20:17:30 UTC (rev 43)
@@ -10,6 +10,7 @@
 build_command = sbdmock -r %(target)s -u %(extraopts)s
 build_results = ("/scratchbox/users/%(user)s/home/%(user)s/%(target)s/result",)
 upload_timeout = 180
+result_url = https://garage.maemo.org/builder/%(product)s/%(build_dir)s/
 
 [chinook]
 product = chinook

Modified: trunk/buildme/tools/buildme.conf.debug
===================================================================
--- trunk/buildme/tools/buildme.conf.debug	2008-05-18 19:25:10 UTC (rev 42)
+++ trunk/buildme/tools/buildme.conf.debug	2008-05-18 20:17:30 UTC (rev 43)
@@ -10,6 +10,7 @@
 build_command = sbdmock -r %(target)s -u %(extraopts)s
 build_results = ("/scratchbox/users/%(user)s/home/%(user)s/%(target)s/result",)
 upload_timeout = 180
+result_url = https://garage.maemo.org/builder/%(product)s/%(build_dir)s/
 
 [chinook]
 product = chinook



More information about the Extras-cauldron-commits mailing list