From 535e9d711404d4010a75c91e9bb442f558d9708f Mon Sep 17 00:00:00 2001 From: Edward Chen <18449977+edgchen1@users.noreply.github.com> Date: Tue, 28 May 2024 17:50:25 -0700 Subject: [PATCH] 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. --- .../ci_build/github/apple/package_release_tasks.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tools/ci_build/github/apple/package_release_tasks.py b/tools/ci_build/github/apple/package_release_tasks.py index 7885023f23..592a326d86 100755 --- a/tools/ci_build/github/apple/package_release_tasks.py +++ b/tools/ci_build/github/apple/package_release_tasks.py @@ -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):