From 263a9904892bbff636a74fe9f4c469ed77c3c295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 15 Mar 2017 16:17:17 +0100 Subject: [PATCH] ostree: Print task ID on success MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relates: #570 Signed-off-by: Lubomír Sedlář --- pungi/phases/ostree.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pungi/phases/ostree.py b/pungi/phases/ostree.py index b7ecf0f7..71fca4f1 100644 --- a/pungi/phases/ostree.py +++ b/pungi/phases/ostree.py @@ -100,8 +100,8 @@ class OSTreeThread(WorkerThread): # mount it. util.makedirs(config['ostree_repo']) - self._run_ostree_cmd(compose, variant, arch, config, repodir, - extra_config_file=extra_config_file) + task_id = self._run_ostree_cmd(compose, variant, arch, config, repodir, + extra_config_file=extra_config_file) if compose.notifier: ref = get_ref_from_treefile(os.path.join(repodir, config['treefile']), @@ -115,7 +115,7 @@ class OSTreeThread(WorkerThread): ref=ref, commitid=commitid) - self.pool.log_info('[DONE ] %s' % msg) + self.pool.log_info('[DONE ] %s (task id: %s)' % (msg, task_id)) def _run_ostree_cmd(self, compose, variant, arch, config, config_repo, extra_config_file=None): cmd = [ @@ -153,6 +153,7 @@ class OSTreeThread(WorkerThread): if output["retcode"] != 0: raise RuntimeError("Runroot task failed: %s. See %s for more details." % (output["task_id"], log_file)) + return output['task_id'] def _clone_repo(self, repodir, url, branch): scm.get_dir_from_scm({'scm': 'git', 'repo': url, 'branch': branch, 'dir': '.'},