mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
devops: use azcopy for better upload performance (#26360)
The credentials are created with `az ad sp create-for-rbac --name "playwright-github-actions" --role "Storage Blob Data Contributor" --scopes /subscriptions/<subscription id>/resourceGroups/<resource group>/providers/Microsoft.Storage/storageAccounts/<storage account>` We cannot use `azure/login@v1` for login as it does not see to properly propagate credentials to `azcopy` in the next step (there are some reports about keyring problems on linux based actions).
This commit is contained in:
parent
65ac0d5256
commit
ff0aef37f8
5
.github/workflows/create_test_report.yml
vendored
5
.github/workflows/create_test_report.yml
vendored
@ -36,8 +36,11 @@ jobs:
|
||||
- name: Upload HTML report to Azure
|
||||
run: |
|
||||
REPORT_DIR='run-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}-${{ github.sha }}'
|
||||
az storage blob upload-batch -s playwright-report -d "\$web/$REPORT_DIR" --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
||||
azcopy login --service-principal --application-id ${{ secrets.AZURE_CLIENT_ID }} --tenant-id ${{ secrets.AZURE_TENANT_ID }}
|
||||
azcopy cp --recursive "./playwright-report/*" "https://mspwblobreport.blob.core.windows.net/\$web/$REPORT_DIR"
|
||||
echo "Report url: https://mspwblobreport.z1.web.core.windows.net/$REPORT_DIR/index.html"
|
||||
env:
|
||||
AZCOPY_SPA_CLIENT_SECRET: '${{ secrets.AZURE_CLIENT_SECRET }}'
|
||||
|
||||
- name: Read pull request number
|
||||
uses: ./.github/actions/download-artifact
|
||||
|
5
.github/workflows/tests_service.yml
vendored
5
.github/workflows/tests_service.yml
vendored
@ -60,5 +60,8 @@ jobs:
|
||||
- name: Upload HTML report to Azure
|
||||
run: |
|
||||
REPORT_DIR='run-service-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}'
|
||||
az storage blob upload-batch -s playwright-report -d "\$web/$REPORT_DIR" --connection-string "${{ secrets.AZURE_CONNECTION_STRING_FOR_BLOB_REPORT }}"
|
||||
azcopy login --service-principal --application-id ${{ secrets.AZURE_CLIENT_ID }} --tenant-id ${{ secrets.AZURE_TENANT_ID }}
|
||||
azcopy cp --recursive "./playwright-report/*" "https://mspwblobreport.blob.core.windows.net/\$web/$REPORT_DIR"
|
||||
echo "Report url: https://mspwblobreport.z1.web.core.windows.net/$REPORT_DIR/index.html#?q=s:failed"
|
||||
env:
|
||||
AZCOPY_SPA_CLIENT_SECRET: '${{ secrets.AZURE_CLIENT_SECRET }}'
|
||||
|
Loading…
Reference in New Issue
Block a user