Ignore:
Timestamp:
Jul 6, 2010, 12:27:50 AM (14 years ago)
Author:
gdb
Message:

Added reporting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/invirtibuilder

    r3035 r3036  
    250250        shutil.rmtree(workdir)
    251251
    252 
    253 def reportBuild(build):
    254     """Run hooks to report the results of a build attempt."""
    255 
    256     c.captureOutput(['run-parts',
    257                    '--arg=%s' % build.build_id,
    258                    '--',
    259                    b._HOOKS_DIR])
    260 
    261 
    262252def build():
    263253    """Deal with items in the build queue.
     
    296286
    297287            db.version = str(b.getVersion(package, commit))
     288            b.runHook('pre-build', [str(db.build_id), db.pocket, db.package,
     289                                    db.commit, db.principal, db.version, str(db.inserted_at)])
    298290
    299291            # If validateBuild returns something other than True, then
     
    367359            os.unlink(os.path.join(b._QUEUE_DIR, build))
    368360
    369             reportBuild(db)
    370 
     361            if db.succeeded:
     362                b.runHook('post-build', [str(db.build_id)])
     363            else:
     364                b.runHook('failed-build', [str(db.build_id)])
    371365
    372366class Invirtibuilder(pyinotify.ProcessEvent):
Note: See TracChangeset for help on using the changeset viewer.