Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: updated auth mode follow-ups (#30440)

Max Schmitt3f8bd5ffd167
diff --git a/.github/workflows/tests_electron.yml b/.github/workflows/tests_electron.yml
index 9107f6c37b..171c51f364 100644
--- a/.github/workflows/tests_electron.yml
+++ b/.github/workflows/tests_electron.yml
@@ -26,6 +26,9 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
+ permissions:
+ id-token: write # This is required for OIDC login (azure/login) to succeed
+ contents: read # This is required for actions/checkout to succeed
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
diff --git a/utils/build/upload-playwright-driver.sh b/utils/build/upload-playwright-driver.sh
index 45c5d3a323..7309444e3a 100755
--- a/utils/build/upload-playwright-driver.sh
+++ b/utils/build/upload-playwright-driver.sh
@@ -8,8 +8,8 @@ cd "$(dirname "$0")"
AZ_STORAGE_ACCOUNT="playwright2"
PACKAGE_VERSION=$(node -p "require('../../package.json').version")
-az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-mac.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-mac.zip"
-az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-mac-arm64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-mac-arm64.zip"
-az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-linux.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-linux.zip"
-az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-linux-arm64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-linux-arm64.zip"
-az storage blob upload -c builds --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-win32_x64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-win32_x64.zip"
+az storage blob upload -c builds --auth-mode login --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-mac.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-mac.zip"
+az storage blob upload -c builds --auth-mode login --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-mac-arm64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-mac-arm64.zip"
+az storage blob upload -c builds --auth-mode login --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-linux.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-linux.zip"
+az storage blob upload -c builds --auth-mode login --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-linux-arm64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-linux-arm64.zip"
+az storage blob upload -c builds --auth-mode login --account-name ${AZ_STORAGE_ACCOUNT} -f ./output/playwright-${PACKAGE_VERSION}-win32_x64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-win32_x64.zip"
diff --git a/utils/upload_flakiness_dashboard.sh b/utils/upload_flakiness_dashboard.sh
index f4b7f96236..d4e02894c5 100755
--- a/utils/upload_flakiness_dashboard.sh
+++ b/utils/upload_flakiness_dashboard.sh
@@ -84,7 +84,7 @@ gzip "${REPORT_NAME}"
AZ_STORAGE_ACCOUNT="folioflakinessdashboard"
-az storage blob upload --account-name "${AZ_STORAGE_ACCOUNT}" -c uploads -f "${REPORT_NAME}.gz" -n "${REPORT_NAME}.gz"
+az storage blob upload --auth-mode login --account-name "${AZ_STORAGE_ACCOUNT}" -c uploads -f "${REPORT_NAME}.gz" -n "${REPORT_NAME}.gz"
UTC_DATE=$(cat <<EOF | node
const date = new Date();
@@ -92,5 +92,5 @@ UTC_DATE=$(cat <<EOF | node
EOF
)
-az storage blob upload --connection-string "${FLAKINESS_CONNECTION_STRING}" -c uploads-permanent -f "${REPORT_NAME}.gz" -n "${UTC_DATE}-${REPORT_NAME}.gz"
+az storage blob upload --auth-mode login --account-name "${AZ_STORAGE_ACCOUNT}" -c uploads-permanent -f "${REPORT_NAME}.gz" -n "${UTC_DATE}-${REPORT_NAME}.gz"
rm -rf "${REPORT_NAME}.gz"