CI: handle zipping irrespective of encryption is possible or not

This commit is contained in:
mahee96
2026-02-25 03:14:50 +05:30
parent f91e0a6295
commit 5444fdd9bb

View File

@@ -216,12 +216,11 @@ def tests_run(model):
def encrypt_logs(name):
pwd = getenv("BUILD_LOG_ZIP_PASSWORD")
# skip encryption entirely if no password provided
if not pwd or not pwd.strip():
print("BUILD_LOG_ZIP_PASSWORD not set — skipping encryption", file=sys.stderr)
return
cwd = getcwd()
if not pwd or not pwd.strip():
print("BUILD_LOG_ZIP_PASSWORD not set — logs will be uploaded UNENCRYPTED", file=sys.stderr)
run(f'cd {cwd}/build/logs && zip -r {cwd}/{name}.zip *')
return
run(f'cd {cwd}/build/logs && zip -e -P "{pwd}" {cwd}/{name}.zip *')
# ----------------------------------------------------------