From bb980940acc5fe7ab2504ad6d900c271ed279e07 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: May 21 2019 16:14:33 +0000 Subject: write repo.json in dist_repo_init --- diff --git a/hub/kojihub.py b/hub/kojihub.py index d918153..2f8ec94 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -2556,6 +2556,17 @@ def dist_repo_init(tag, keys, task_opts): koji.ensuredir(groupsdir) shutil.copyfile(os.path.join(koji.pathinfo.work(), task_opts['comps']), groupsdir + '/comps.xml') + # write repo info to disk + repo_info = { + 'id': repo_id, + 'tag': tinfo['name'], + 'tag_id': tinfo['id'], + 'keys': keys, + 'volume': volume, + 'task_opts': task_opts, + } + with open('%s/repo.json' % repodir, 'w') as fp: + json.dump(repo_info, fp, indent=2) # note: we need to match args from the other postRepoInit callback koji.plugin.run_callbacks('postRepoInit', tag=tinfo, with_src=False, with_debuginfo=False, event=event, repo_id=repo_id,