From 4beea6e1a40ddbd58b157f2ba516ce67e7d3cf55 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 21 Oct 2026 18:30:37 -0700 Subject: [PATCH] package CI OTA images [upload] --- .github/workflows/build.yaml | 2 +- scripts/package_ota.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e1c5ca5..09f683d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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]')" diff --git a/scripts/package_ota.py b/scripts/package_ota.py index 15a2c79..b476223 100755 --- a/scripts/package_ota.py +++ b/scripts/package_ota.py @@ -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: