mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
Update package_release_tasks.py (#20835)
1. Move azcopy environment variables out of script and into an Azure DevOps variable group. Move towards consolidating the managed identity client ID definition in one place. 2. Disable azcopy overwrite. We don't want to accidentally change the files for a released package.
This commit is contained in:
parent
362a623905
commit
535e9d7114
1 changed files with 2 additions and 12 deletions
|
|
@ -6,7 +6,6 @@ from __future__ import annotations
|
|||
|
||||
import argparse
|
||||
import glob
|
||||
import os
|
||||
import shlex
|
||||
import subprocess
|
||||
from enum import Enum
|
||||
|
|
@ -25,22 +24,13 @@ def _run(command: list[str], **kwargs):
|
|||
|
||||
|
||||
def upload_pod_archive(pod_archive_path: Path):
|
||||
env = os.environ.copy()
|
||||
env.update(
|
||||
{
|
||||
# configure azcopy to use managed identity
|
||||
"AZCOPY_AUTO_LOGIN_TYPE": "MSI",
|
||||
"AZCOPY_MSI_CLIENT_ID": "63b63039-6328-442f-954b-5a64d124e5b4",
|
||||
}
|
||||
)
|
||||
|
||||
storage_account_name = "onnxruntimepackages"
|
||||
storage_account_container_name = "$web"
|
||||
dest_url = f"https://{storage_account_name}.blob.core.windows.net/{storage_account_container_name}/"
|
||||
|
||||
upload_command = ["azcopy", "cp", str(pod_archive_path), dest_url]
|
||||
upload_command = ["azcopy", "cp", str(pod_archive_path), dest_url, "--overwrite", "false"]
|
||||
|
||||
_run(upload_command, env=env)
|
||||
_run(upload_command)
|
||||
|
||||
|
||||
def update_podspec(pod_archive_path: Path, podspec_path: Path):
|
||||
|
|
|
|||
Loading…
Reference in a new issue