From 02e3df9cd0b31fe4213ff3778fdf233feb5ec1a1 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 19 Apr 2024 19:32:37 +0200 Subject: [PATCH] follow-ups --- .github/workflows/publish_canary.yml | 7 +++---- .github/workflows/publish_release_driver.yml | 9 ++++----- utils/build/upload-playwright-driver.sh | 12 +++++++----- utils/upload_flakiness_dashboard.sh | 4 +++- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish_canary.yml b/.github/workflows/publish_canary.yml index d91d7708ab..c28ca4a525 100644 --- a/.github/workflows/publish_canary.yml +++ b/.github/workflows/publish_canary.yml @@ -17,9 +17,9 @@ jobs: runs-on: ubuntu-20.04 if: github.repository == 'microsoft/playwright' permissions: - contents: read - id-token: write - environment: Release + id-token: write # This is required for OIDC login (azure/login) to succeed + contents: read # This is required for actions/checkout to succeed + environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login) steps: - uses: actions/checkout@v4 - name: Azure Login @@ -59,7 +59,6 @@ jobs: - name: build & publish driver env: AZ_UPLOAD_FOLDER: driver/next - AZ_ACCOUNT_NAME: ${{ secrets.AZ_ACCOUNT_NAME }} run: | utils/build/build-playwright-driver.sh utils/build/upload-playwright-driver.sh diff --git a/.github/workflows/publish_release_driver.yml b/.github/workflows/publish_release_driver.yml index 3207aba9cd..b406c15eda 100644 --- a/.github/workflows/publish_release_driver.yml +++ b/.github/workflows/publish_release_driver.yml @@ -11,11 +11,11 @@ jobs: publish-driver-release: name: "publish playwright driver to CDN" runs-on: ubuntu-20.04 - permissions: - id-token: write # This is required for OIDC login (azure/login) to succeed - contents: read # This is required for actions/checkout to succeed if: github.repository == 'microsoft/playwright' - environment: Release + permissions: + id-token: write # This is required for OIDC login (azure/login) to succeed + contents: read # This is required for actions/checkout to succeed + environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login) steps: - uses: actions/checkout@v4 - name: Azure Login @@ -35,4 +35,3 @@ jobs: - run: utils/build/upload-playwright-driver.sh env: AZ_UPLOAD_FOLDER: driver - AZ_ACCOUNT_NAME: ${{ secrets.AZ_ACCOUNT_NAME }} diff --git a/utils/build/upload-playwright-driver.sh b/utils/build/upload-playwright-driver.sh index 92804999cf..45c5d3a323 100755 --- a/utils/build/upload-playwright-driver.sh +++ b/utils/build/upload-playwright-driver.sh @@ -5,9 +5,11 @@ set +x trap "cd $(pwd -P)" EXIT cd "$(dirname "$0")" +AZ_STORAGE_ACCOUNT="playwright2" PACKAGE_VERSION=$(node -p "require('../../package.json').version") -az storage blob upload -c builds --account-name ${AZ_ACCOUNT_NAME} -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_ACCOUNT_NAME} -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_ACCOUNT_NAME} -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_ACCOUNT_NAME} -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_ACCOUNT_NAME} -f ./output/playwright-${PACKAGE_VERSION}-win32_x64.zip -n "${AZ_UPLOAD_FOLDER}/playwright-${PACKAGE_VERSION}-win32_x64.zip" + +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" diff --git a/utils/upload_flakiness_dashboard.sh b/utils/upload_flakiness_dashboard.sh index b4940d0980..f4b7f96236 100755 --- a/utils/upload_flakiness_dashboard.sh +++ b/utils/upload_flakiness_dashboard.sh @@ -82,7 +82,9 @@ node -e "${EMBED_METADATA_SCRIPT}" "$1" > "${REPORT_NAME}" gzip "${REPORT_NAME}" -az storage blob upload --account-name folioflakinessdashboard -c uploads -f "${REPORT_NAME}.gz" -n "${REPORT_NAME}.gz" +AZ_STORAGE_ACCOUNT="folioflakinessdashboard" + +az storage blob upload --account-name "${AZ_STORAGE_ACCOUNT}" -c uploads -f "${REPORT_NAME}.gz" -n "${REPORT_NAME}.gz" UTC_DATE=$(cat <