1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-04 16:30:12 +02:00

Merge branch 'missing_logs' into 'master'

Deploy build error log in case of an exception

See merge request fdroid/fdroidserver!1007
This commit is contained in:
Hans-Christoph Steiner 2021-08-27 20:09:12 +00:00
commit 63eaa5469c

View File

@ -1212,7 +1212,9 @@ def main():
common.force_exit(1)
add_failed_builds_entry(failed_builds, appid, build, vcse)
wikilog = str(vcse)
common.deploy_build_log_with_rsync(appid, build.versionCode, str(vcse))
common.deploy_build_log_with_rsync(
appid, build.versionCode, "".join(traceback.format_exc())
)
except FDroidException as e:
with open(os.path.join(log_dir, appid + '.log'), 'a+') as f:
f.write('\n\n============================================================\n')
@ -1228,6 +1230,9 @@ def main():
common.force_exit(1)
add_failed_builds_entry(failed_builds, appid, build, e)
wikilog = e.get_wikitext()
common.deploy_build_log_with_rsync(
appid, build.versionCode, "".join(traceback.format_exc())
)
except Exception as e:
logging.error("Could not build app %s due to unknown error: %s" % (
appid, traceback.format_exc()))
@ -1236,6 +1241,9 @@ def main():
common.force_exit(1)
add_failed_builds_entry(failed_builds, appid, build, e)
wikilog = str(e)
common.deploy_build_log_with_rsync(
appid, build.versionCode, "".join(traceback.format_exc())
)
if options.wiki and wikilog:
try: