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
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('/'):
dest_path += '/' # make sure rsync knows this is a directory
cmd = ['rsync',

View File

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