Send fedmsg message on ostree compose finishg
This sends a message when we finish composing an ostree. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
bf46048cbf
commit
2c401a4a5c
@ -56,8 +56,25 @@ class OSTreeThread(WorkerThread):
|
|||||||
|
|
||||||
self._run_ostree_cmd(compose, variant, arch, config, repodir)
|
self._run_ostree_cmd(compose, variant, arch, config, repodir)
|
||||||
|
|
||||||
|
if compose.notifier:
|
||||||
|
ref, commitid = self._get_commit_info()
|
||||||
|
compose.notifier.send('ostree',
|
||||||
|
variant=variant.uid,
|
||||||
|
arch=arch,
|
||||||
|
ref=ref,
|
||||||
|
commitid=commitid)
|
||||||
|
|
||||||
self.pool.log_info('[DONE ] %s' % msg)
|
self.pool.log_info('[DONE ] %s' % msg)
|
||||||
|
|
||||||
|
def _get_commit_info(self):
|
||||||
|
with open(os.path.join(self.logdir, 'create-ostree-repo.log'), 'r') as f:
|
||||||
|
for line in f.readlines():
|
||||||
|
if ' => ' in line:
|
||||||
|
line = line.replace('\n', '')
|
||||||
|
ref, _, commitid = line.partition(' => ')
|
||||||
|
return ref, commitid
|
||||||
|
return None, None
|
||||||
|
|
||||||
def _run_ostree_cmd(self, compose, variant, arch, config, config_repo):
|
def _run_ostree_cmd(self, compose, variant, arch, config, config_repo):
|
||||||
cmd = [
|
cmd = [
|
||||||
'pungi-make-ostree',
|
'pungi-make-ostree',
|
||||||
|
Loading…
Reference in New Issue
Block a user