conf: Handle app_key correctly for GitHub connections

app_key is expected to be a file path, not a value in the
configuration file.

Change-Id: Ibf0641cd31148749477003ced574410178cace7c
This commit is contained in:
Michael Kelly 2023-05-11 15:07:57 -07:00
parent 17a155b28c
commit 67e6b535e9
No known key found for this signature in database
GPG Key ID: 77F7FE93040ECF3E
1 changed files with 2 additions and 2 deletions

View File

@ -215,8 +215,8 @@ class Zuul:
filter(namespace=self.namespace).\
get(name=connection['secretName'])
for k, v in obj.obj['data'].items():
if k == 'sshkey':
v = f'/etc/zuul/connections/{connection_name}/sshkey'
if k in ('sshkey', 'app_key'):
v = f'/etc/zuul/connections/{connection_name}/{k}'
else:
v = base64.b64decode(v).decode('utf-8')
connection[k] = v