From 388f3458b3ff9d70b7ef166489d9f576deb2c94b Mon Sep 17 00:00:00 2001 From: jason1028kr Date: Mon, 24 Feb 2025 22:38:41 -0800 Subject: [PATCH] test: use diff storage account --- vhdbuilder/packer/trivy-scan.sh | 8 ++++---- vhdbuilder/packer/vhd-scanning.sh | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vhdbuilder/packer/trivy-scan.sh b/vhdbuilder/packer/trivy-scan.sh index 19227db0b49..4bf40278542 100644 --- a/vhdbuilder/packer/trivy-scan.sh +++ b/vhdbuilder/packer/trivy-scan.sh @@ -206,22 +206,22 @@ chmod a+r "${CVE_DIFF_QUERY_OUTPUT_PATH}" chmod a+r "${TRIVY_REPORT_ROOTFS_JSON_PATH}" chmod a+r "${TRIVY_REPORT_IMAGE_TABLE_PATH}" -login_with_user_assigned_managed_identity ${AZURE_MSI_RESOURCE_STRING} +# login_with_user_assigned_managed_identity ${AZURE_MSI_RESOURCE_STRING} az storage blob upload --file ${CVE_DIFF_QUERY_OUTPUT_PATH} \ --container-name ${SIG_CONTAINER_NAME} \ --name ${CVE_DIFF_UPLOAD_REPORT_NAME} \ - --account-name ${STORAGE_ACCOUNT_NAME} \ + --account-name ${ACCOUNT_NAME} \ --auth-mode login az storage blob upload --file ${TRIVY_REPORT_ROOTFS_JSON_PATH} \ --container-name ${SIG_CONTAINER_NAME} \ --name ${TRIVY_UPLOAD_REPORT_NAME} \ - --account-name ${STORAGE_ACCOUNT_NAME} \ + --account-name ${ACCOUNT_NAME} \ --auth-mode login az storage blob upload --file ${TRIVY_REPORT_IMAGE_TABLE_PATH} \ --container-name ${SIG_CONTAINER_NAME} \ --name ${TRIVY_UPLOAD_TABLE_NAME} \ - --account-name ${STORAGE_ACCOUNT_NAME} \ + --account-name ${ACCOUNT_NAME} \ --auth-mode login diff --git a/vhdbuilder/packer/vhd-scanning.sh b/vhdbuilder/packer/vhd-scanning.sh index 2b288e33886..3084fb3584a 100755 --- a/vhdbuilder/packer/vhd-scanning.sh +++ b/vhdbuilder/packer/vhd-scanning.sh @@ -165,13 +165,13 @@ az vm run-command invoke \ capture_benchmark "${SCRIPT_NAME}_run_az_scan_command" -az storage blob download --container-name ${SIG_CONTAINER_NAME} --name ${TRIVY_UPLOAD_REPORT_NAME} --file trivy-report.json --account-name ${STORAGE_ACCOUNT_NAME} --auth-mode login -az storage blob download --container-name ${SIG_CONTAINER_NAME} --name ${TRIVY_UPLOAD_TABLE_NAME} --file trivy-images-table.txt --account-name ${STORAGE_ACCOUNT_NAME} --auth-mode login -az storage blob download --container-name ${SIG_CONTAINER_NAME} --name ${CVE_DIFF_UPLOAD_REPORT_NAME} --file cve-diff.txt --account-name ${STORAGE_ACCOUNT_NAME} --auth-mode login +az storage blob download --container-name ${SIG_CONTAINER_NAME} --name ${TRIVY_UPLOAD_REPORT_NAME} --file trivy-report.json --account-name ${ACCOUNT_NAME} --auth-mode login +az storage blob download --container-name ${SIG_CONTAINER_NAME} --name ${TRIVY_UPLOAD_TABLE_NAME} --file trivy-images-table.txt --account-name ${ACCOUNT_NAME} --auth-mode login +az storage blob download --container-name ${SIG_CONTAINER_NAME} --name ${CVE_DIFF_UPLOAD_REPORT_NAME} --file cve-diff.txt --account-name ${ACCOUNT_NAME} --auth-mode login -az storage blob delete --account-name ${STORAGE_ACCOUNT_NAME} --container-name ${SIG_CONTAINER_NAME} --name ${TRIVY_UPLOAD_REPORT_NAME} --auth-mode login -az storage blob delete --account-name ${STORAGE_ACCOUNT_NAME} --container-name ${SIG_CONTAINER_NAME} --name ${TRIVY_UPLOAD_TABLE_NAME} --auth-mode login -az storage blob delete --account-name ${STORAGE_ACCOUNT_NAME} --container-name ${SIG_CONTAINER_NAME} --name ${CVE_DIFF_UPLOAD_REPORT_NAME} --auth-mode login +az storage blob delete --account-name ${ACCOUNT_NAME} --container-name ${SIG_CONTAINER_NAME} --name ${TRIVY_UPLOAD_REPORT_NAME} --auth-mode login +az storage blob delete --account-name ${ACCOUNT_NAME} --container-name ${SIG_CONTAINER_NAME} --name ${TRIVY_UPLOAD_TABLE_NAME} --auth-mode login +az storage blob delete --account-name ${ACCOUNT_NAME} --container-name ${SIG_CONTAINER_NAME} --name ${CVE_DIFF_UPLOAD_REPORT_NAME} --auth-mode login capture_benchmark "${SCRIPT_NAME}_download_and_delete_blobs"