mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-06 16:55:43 +08:00
jenkins: publish casync releases from device (#32142)
* publish in ci * overwrite * publish in ci * fix * test it * Revert "test it" This reverts commit b3de51dc693df79b980d7dffc18bcc3c88d83375. * use right token * cleanup after uploading --------- Co-authored-by: Comma Device <device@comma.ai>
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
from openpilot.tools.lib.azure_container import AzureContainer
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
del os.environ["AZURE_TOKEN"] # regerenate token for this bucket
|
||||
|
||||
OPENPILOT_RELEASES_CONTAINER = AzureContainer("commadist", "openpilot-releases")
|
||||
|
||||
parser = argparse.ArgumentParser(description='upload casync folder to azure')
|
||||
parser.add_argument("casync_dir", type=str, help="casync directory")
|
||||
args = parser.parse_args()
|
||||
|
||||
casync_dir = pathlib.Path(args.casync_dir)
|
||||
|
||||
for f in casync_dir.rglob("*"):
|
||||
if f.is_file():
|
||||
blob_name = f.relative_to(casync_dir)
|
||||
print(f"uploading {f} to {blob_name}")
|
||||
OPENPILOT_RELEASES_CONTAINER.upload_file(str(f), str(blob_name), overwrite=True)
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
CASYNC_DIR="${CASYNC_DIR:=/tmp/casync}"
|
||||
|
||||
OPENPILOT_RELEASES="https://commadist.blob.core.windows.net/openpilot-releases/"
|
||||
|
||||
SAS="$(python -c 'from tools.lib.azure_container import get_container_sas;print(get_container_sas("commadist","openpilot-releases"))')"
|
||||
|
||||
azcopy cp "$CASYNC_DIR*" "$OPENPILOT_RELEASES?$SAS" --recursive
|
||||
Reference in New Issue
Block a user