package CI OTA images [upload]

This commit is contained in:
Adeeb Shihadeh
2026-10-21 18:30:37 -07:00
parent 3e3562b73d
commit 4beea6e1a4
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ jobs:
env:
AGNOS_UPDATE_URL: https://gitlab.com/commaai/ci-artifacts/-/raw/agnos-builder/pr-${{ github.event.number }}
run: |
scripts/package_ota.py
scripts/package_ota.py --ota-only
- name: Save PR number, VERSION and stats
if: "contains(env.LAST_COMMIT_MESSAGE, '[upload]')"
+7 -1
View File
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
import argparse
import json
import os
import hashlib
@@ -170,9 +171,12 @@ def process_file(entry):
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--ota-only", action="store_true", help="Package only OTA partitions and manifests")
args = parser.parse_args()
OTA_OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
files = [(process_file(x), x.ota) for x in GPTS + PARTITIONS]
files = [(process_file(x), x.ota) for x in GPTS + PARTITIONS if not args.ota_only or x.ota]
configs = [
# URL, file name, only OTA partitions
@@ -182,6 +186,8 @@ if __name__ == "__main__":
(AGNOS_STAGING_UPDATE_URL, "all-partitions-staging.json", False),
]
for remote_url, output_fn, only_ota in configs:
if args.ota_only and not only_ota:
continue
processed_files = []
for f, ota in deepcopy(files):
if only_ota and not ota: