Skip to content

Commit

Permalink
test: use diff storage account
Browse files Browse the repository at this point in the history
  • Loading branch information
jason1028kr committed Feb 25, 2025
1 parent d6f7dbe commit 388f345
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions vhdbuilder/packer/trivy-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 6 additions & 6 deletions vhdbuilder/packer/vhd-scanning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 388f345

Please sign in to comment.