1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-20 13:50:12 +01:00

build: rsync buildlogs to <webroot>/repo

This commit is contained in:
Michael Pöhn 2019-06-26 17:00:01 +02:00
parent bde12e2a52
commit f30983368c
2 changed files with 5 additions and 5 deletions

View File

@ -3272,7 +3272,7 @@ def deploy_build_log_with_rsync(appid, vercode, log_content,
# TODO: sign compressed log file, if a signing key is configured # TODO: sign compressed log file, if a signing key is configured
for webroot in config.get('serverwebroot', []): for webroot in config.get('serverwebroot', []):
dest_path = os.path.join(webroot, "buildlogs") dest_path = os.path.join(webroot, "repo")
if not dest_path.endswith('/'): if not dest_path.endswith('/'):
dest_path += '/' # make sure rsync knows this is a directory dest_path += '/' # make sure rsync knows this is a directory
cmd = ['rsync', cmd = ['rsync',

View File

@ -951,8 +951,8 @@ class CommonTest(unittest.TestCase):
fdroidserver.common.options.quiet = False fdroidserver.common.options.quiet = False
fdroidserver.common.config = {} fdroidserver.common.config = {}
fdroidserver.common.config['serverwebroot'] = [ fdroidserver.common.config['serverwebroot'] = [
'example.com:/var/www/fdroid/repo/', 'example.com:/var/www/fdroid/',
'example.com:/var/www/fdroid/archive/'] 'example.com:/var/www/fbot/']
fdroidserver.common.config['deploy_process_logs'] = True fdroidserver.common.config['deploy_process_logs'] = True
fdroidserver.common.config['identity_file'] = 'ssh/id_rsa' fdroidserver.common.config['identity_file'] = 'ssh/id_rsa'
@ -969,7 +969,7 @@ class CommonTest(unittest.TestCase):
'-e', '-e',
'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa', 'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa',
cmd[6], cmd[6],
'example.com:/var/www/fdroid/repo/buildlogs/'], 'example.com:/var/www/fdroid/repo/'],
cmd) cmd)
self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz')) self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz'))
with gzip.open(cmd[6], 'r') as f: with gzip.open(cmd[6], 'r') as f:
@ -982,7 +982,7 @@ class CommonTest(unittest.TestCase):
'-e', '-e',
'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa', 'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa',
cmd[6], cmd[6],
'example.com:/var/www/fdroid/archive/buildlogs/'], 'example.com:/var/www/fbot/repo/'],
cmd) cmd)
self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz')) self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz'))
with gzip.open(cmd[6], 'r') as f: with gzip.open(cmd[6], 'r') as f: