From: Michael Tremer Date: Thu, 6 Oct 2022 18:47:54 +0000 (+0000) Subject: jobs: Export any keys to the builders X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8106433584dbf4ab95c5fe1d4cce534c1d104a6d;p=pbs.git jobs: Export any keys to the builders Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/jobs.py b/src/buildservice/jobs.py index 76faa03a..1d4c048a 100644 --- a/src/buildservice/jobs.py +++ b/src/buildservice/jobs.py @@ -489,6 +489,24 @@ class Job(base.DataObject): """ return self.distro.get_config(local=local, repo=self.build.build_repo) + @property + def repos(self): + """ + A list of all repositories being used in this job. + """ + # XXX this is incorrect + return self.distro.repos + + @property + def keys(self): + """ + A list of keys that are used in this job. + + i.e. what has to be imported into the builder + """ + # Return all keys for all repositories that are being used + return [repo.key for repo in self.repos] + async def depcheck(self): """ Perform dependency check diff --git a/src/hub/queue.py b/src/hub/queue.py index 34deb752..1a10d95b 100644 --- a/src/hub/queue.py +++ b/src/hub/queue.py @@ -139,4 +139,9 @@ class QueueHandler(BackendMixin, tornado.websocket.WebSocketHandler): # URL to the package "pkg" : job.pkg.download_url, + + # Keys + "keys" : [ + key.public_key for key in job.keys + ], })