projects
/
invirt/packages/invirt-dev.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added reporting
[invirt/packages/invirt-dev.git]
/
invirtibuilder
diff --git
a/invirtibuilder
b/invirtibuilder
index
24861f5
..
a42ce55
100755
(executable)
--- a/
invirtibuilder
+++ b/
invirtibuilder
@@
-249,16
+249,6
@@
def packageWorkdir(package, commit):
finally:
shutil.rmtree(workdir)
finally:
shutil.rmtree(workdir)
-
-def reportBuild(build):
- """Run hooks to report the results of a build attempt."""
-
- c.captureOutput(['run-parts',
- '--arg=%s' % build.build_id,
- '--',
- b._HOOKS_DIR])
-
-
def build():
"""Deal with items in the build queue.
def build():
"""Deal with items in the build queue.
@@
-295,6
+285,8
@@
def build():
src = b.validateBuild(pocket, package, commit)
db.version = str(b.getVersion(package, commit))
src = b.validateBuild(pocket, package, commit)
db.version = str(b.getVersion(package, commit))
+ b.runHook('pre-build', [str(db.build_id), db.pocket, db.package,
+ db.commit, db.principal, db.version, str(db.inserted_at)])
# If validateBuild returns something other than True, then
# it means we should copy from that pocket to our pocket.
# If validateBuild returns something other than True, then
# it means we should copy from that pocket to our pocket.
@@
-366,8
+358,10
@@
def build():
# build queue item
os.unlink(os.path.join(b._QUEUE_DIR, build))
# build queue item
os.unlink(os.path.join(b._QUEUE_DIR, build))
- reportBuild(db)
-
+ if db.succeeded:
+ b.runHook('post-build', [str(db.build_id)])
+ else:
+ b.runHook('failed-build', [str(db.build_id)])
class Invirtibuilder(pyinotify.ProcessEvent):
"""Process inotify triggers to build new packages."""
class Invirtibuilder(pyinotify.ProcessEvent):
"""Process inotify triggers to build new packages."""