bundles/woodpecker-agent: fix metadata reactor

This commit is contained in:
Franzi 2022-12-25 08:25:00 +01:00
parent 071250d798
commit cb4d28c994
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -2,7 +2,7 @@
'woodpecker-agent/environment', 'woodpecker-agent/environment',
'woodpecker-agent/version', 'woodpecker-agent/version',
) )
def nginx(metadata): def environment(metadata):
env = {} env = {}
server = repo.get_node(metadata.get('woodpecker-agent/server')) server = repo.get_node(metadata.get('woodpecker-agent/server'))
@ -16,6 +16,8 @@ def nginx(metadata):
env['WOODPECKER_HOSTNAME'] = metadata.get('hostname') env['WOODPECKER_HOSTNAME'] = metadata.get('hostname')
env['WOODPECKER_LOG_LEVEL'] = server.metadata.get('woodpecker-server/environment/WOODPECKER_LOG_LEVEL')
debug = server.metadata.get('woodpecker-server/environment/GODEBUG', None) debug = server.metadata.get('woodpecker-server/environment/GODEBUG', None)
if debug: if debug:
env['GODEBUG'] = debug env['GODEBUG'] = debug