ostree: Print task ID on success

Relates: #570
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-03-15 16:17:17 +01:00
parent 5ee285cc24
commit 263a990489

View File

@ -100,7 +100,7 @@ class OSTreeThread(WorkerThread):
# mount it. # mount it.
util.makedirs(config['ostree_repo']) util.makedirs(config['ostree_repo'])
self._run_ostree_cmd(compose, variant, arch, config, repodir, task_id = self._run_ostree_cmd(compose, variant, arch, config, repodir,
extra_config_file=extra_config_file) extra_config_file=extra_config_file)
if compose.notifier: if compose.notifier:
@ -115,7 +115,7 @@ class OSTreeThread(WorkerThread):
ref=ref, ref=ref,
commitid=commitid) 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): def _run_ostree_cmd(self, compose, variant, arch, config, config_repo, extra_config_file=None):
cmd = [ cmd = [
@ -153,6 +153,7 @@ class OSTreeThread(WorkerThread):
if output["retcode"] != 0: if output["retcode"] != 0:
raise RuntimeError("Runroot task failed: %s. See %s for more details." raise RuntimeError("Runroot task failed: %s. See %s for more details."
% (output["task_id"], log_file)) % (output["task_id"], log_file))
return output['task_id']
def _clone_repo(self, repodir, url, branch): def _clone_repo(self, repodir, url, branch):
scm.get_dir_from_scm({'scm': 'git', 'repo': url, 'branch': branch, 'dir': '.'}, scm.get_dir_from_scm({'scm': 'git', 'repo': url, 'branch': branch, 'dir': '.'},