mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-07-21 04:47:17 +01:00
Preview site and storage changes. Cleanup script changes.
This commit is contained in:
+16
-16
@@ -101,13 +101,13 @@ jobs:
|
|||||||
- name: "Az CLI login"
|
- name: "Az CLI login"
|
||||||
uses: azure/login@v1
|
uses: azure/login@v1
|
||||||
with:
|
with:
|
||||||
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
client-id: ${{ secrets.E2ETESTS_CLIENT_ID }}
|
||||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }}
|
||||||
subscription-id: ${{ secrets.PREVIEW_SUBSCRIPTION_ID }}
|
subscription-id: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }}
|
||||||
- name: Upload build to preview blob storage
|
- name: Upload build to preview blob storage
|
||||||
run: az storage blob upload-batch -d '$web' -s 'dist' --account-name ${{ secrets.PREVIEW_STORAGE_ACCOUNT_NAME }} --destination-path "${{github.event.pull_request.head.sha || github.sha}}" --auth-mode login --overwrite true
|
run: az storage blob upload-batch -d '$web' -s 'dist' --account-name ${{ secrets.E2ETESTS_STORAGEACCOUNT_NAME }} --destination-path "${{github.event.pull_request.head.sha || github.sha}}" --auth-mode login --overwrite true
|
||||||
- name: Upload preview config to blob storage
|
- name: Upload preview config to blob storage
|
||||||
run: az storage blob upload -c '$web' -f ./preview/config.json --account-name ${{ secrets.PREVIEW_STORAGE_ACCOUNT_NAME }} --name "${{github.event.pull_request.head.sha || github.sha}}/config.json" --auth-mode login --overwrite true
|
run: az storage blob upload -c '$web' -f ./preview/config.json --account-name ${{ secrets.E2ETESTS_STORAGEACCOUNT_NAME }} --name "${{github.event.pull_request.head.sha || github.sha}}/config.json" --auth-mode login --overwrite true
|
||||||
nuget:
|
nuget:
|
||||||
name: Publish Nuget
|
name: Publish Nuget
|
||||||
if: github.ref == 'refs/heads/master' || contains(github.ref, 'hotfix/') || contains(github.ref, 'release/')
|
if: github.ref == 'refs/heads/master' || contains(github.ref, 'hotfix/') || contains(github.ref, 'release/')
|
||||||
@@ -233,9 +233,9 @@ jobs:
|
|||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
uses: Azure/login@v2
|
uses: Azure/login@v2
|
||||||
with:
|
with:
|
||||||
client-id: ${{ secrets.E2E_TESTS_CLIENT_ID }}
|
client-id: ${{ secrets.E2ETESTS_CLIENT_ID }}
|
||||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }}
|
||||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
subscription-id: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }}
|
||||||
- name: Upload shard blob-report to Azure Storage
|
- name: Upload shard blob-report to Azure Storage
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
env:
|
env:
|
||||||
@@ -243,7 +243,7 @@ jobs:
|
|||||||
SHARD: ${{ matrix.shardIndex }}
|
SHARD: ${{ matrix.shardIndex }}
|
||||||
run: |
|
run: |
|
||||||
az storage blob upload-batch \
|
az storage blob upload-batch \
|
||||||
--account-name ${{ secrets.PREVIEW_STORAGE_ACCOUNT_NAME }} \
|
--account-name ${{ secrets.E2ETESTS_STORAGEACCOUNT_NAME }} \
|
||||||
--auth-mode login \
|
--auth-mode login \
|
||||||
-d playwright-reports \
|
-d playwright-reports \
|
||||||
-s blob-report \
|
-s blob-report \
|
||||||
@@ -272,9 +272,9 @@ jobs:
|
|||||||
- name: "Az CLI login"
|
- name: "Az CLI login"
|
||||||
uses: Azure/login@v2
|
uses: Azure/login@v2
|
||||||
with:
|
with:
|
||||||
client-id: ${{ secrets.AZURE_CLIENT_ID }}
|
client-id: ${{ secrets.E2ETESTS_CLIENT_ID }}
|
||||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
tenant-id: ${{ secrets.E2ETESTS_TENANT_ID }}
|
||||||
subscription-id: ${{ secrets.PREVIEW_SUBSCRIPTION_ID }}
|
subscription-id: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }}
|
||||||
|
|
||||||
- name: Download all shard reports from Azure Storage
|
- name: Download all shard reports from Azure Storage
|
||||||
env:
|
env:
|
||||||
@@ -282,7 +282,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p all-blob-reports
|
mkdir -p all-blob-reports
|
||||||
az storage blob download-batch \
|
az storage blob download-batch \
|
||||||
--account-name ${{ secrets.PREVIEW_STORAGE_ACCOUNT_NAME }} \
|
--account-name ${{ secrets.E2ETESTS_STORAGEACCOUNT_NAME }} \
|
||||||
--auth-mode login \
|
--auth-mode login \
|
||||||
-s playwright-reports \
|
-s playwright-reports \
|
||||||
--pattern "${KEY}/shards/*" \
|
--pattern "${KEY}/shards/*" \
|
||||||
@@ -305,7 +305,7 @@ jobs:
|
|||||||
KEY: ${{ github.run_id }}-${{ github.run_attempt }}
|
KEY: ${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
run: |
|
run: |
|
||||||
az storage blob upload \
|
az storage blob upload \
|
||||||
--account-name ${{ secrets.PREVIEW_STORAGE_ACCOUNT_NAME }} \
|
--account-name ${{ secrets.E2ETESTS_STORAGEACCOUNT_NAME }} \
|
||||||
--auth-mode login \
|
--auth-mode login \
|
||||||
-c playwright-reports \
|
-c playwright-reports \
|
||||||
-n "${KEY}/report.zip" \
|
-n "${KEY}/report.zip" \
|
||||||
@@ -318,7 +318,7 @@ jobs:
|
|||||||
KEY: ${{ github.run_id }}-${{ github.run_attempt }}
|
KEY: ${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
run: |
|
run: |
|
||||||
az storage blob delete-batch \
|
az storage blob delete-batch \
|
||||||
--account-name ${{ secrets.PREVIEW_STORAGE_ACCOUNT_NAME }} \
|
--account-name ${{ secrets.E2ETESTS_STORAGEACCOUNT_NAME }} \
|
||||||
--auth-mode login \
|
--auth-mode login \
|
||||||
-s playwright-reports \
|
-s playwright-reports \
|
||||||
--pattern "${KEY}/shards/*"
|
--pattern "${KEY}/shards/*"
|
||||||
@@ -328,7 +328,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR: ${{ github.event.pull_request.number }}
|
PR: ${{ github.event.pull_request.number }}
|
||||||
SA_ID: /subscriptions/${{ secrets.PREVIEW_SUBSCRIPTION_ID }}/resourceGroups/dataexplorer-preview/providers/Microsoft.Storage/storageAccounts/dataexplorerpreview
|
SA_ID: /subscriptions/${{ secrets.E2ETESTS_SUBSCRIPTION_ID }}/resourceGroups/dataexplorer-preview/providers/Microsoft.Storage/storageAccounts/${{ secrets.E2ETESTS_STORAGEACCOUNT_NAME }}
|
||||||
KEY: ${{ github.run_id }}-${{ github.run_attempt }}
|
KEY: ${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ jobs:
|
|||||||
AZURE_SUBSCRIPTION_ID: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }}
|
AZURE_SUBSCRIPTION_ID: ${{ secrets.E2ETESTS_SUBSCRIPTION_ID }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
env:
|
||||||
|
E2ETESTS_RESOURCEGROUP_NAME : ${{ secrets.E2ETESTS_RESOURCEGROUP_NAME }}
|
||||||
|
|
||||||
- name: "Az CLI login"
|
- name: "Az CLI login"
|
||||||
uses: azure/login@v2
|
uses: azure/login@v2
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ const fetch = require("node-fetch");
|
|||||||
|
|
||||||
const backendEndpoint = "https://cdb-ms-mpac-pbe.cosmos.azure.com";
|
const backendEndpoint = "https://cdb-ms-mpac-pbe.cosmos.azure.com";
|
||||||
const previewSiteEndpoint = "https://dataexplorer-preview.azurewebsites.net";
|
const previewSiteEndpoint = "https://dataexplorer-preview.azurewebsites.net";
|
||||||
const previewStorageWebsiteEndpoint = "https://dataexplorerpreview.z5.web.core.windows.net/";
|
const previewStorageWebsiteEndpoint = "_REPLACE_STORAGE_WEBSITE_ENDPOINT_";
|
||||||
const githubApiUrl = "https://api.github.com/repos/Azure/cosmos-explorer";
|
const githubApiUrl = "https://api.github.com/repos/Azure/cosmos-explorer";
|
||||||
const azurePortalMpacEndpoint = "https://ms.portal.azure.com/";
|
const azurePortalMpacEndpoint = "https://ms.portal.azure.com/";
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb");
|
|||||||
const ms = require("ms");
|
const ms = require("ms");
|
||||||
|
|
||||||
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
|
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
|
||||||
const resourceGroupName = "de-e2e-tests";
|
const resourceGroupName = process.env["E2ETESTS_RESOURCEGROUP_NAME"];
|
||||||
|
|
||||||
const thirtyMinutesAgo = new Date(Date.now() - 1000 * 60 * 30).getTime();
|
const thirtyMinutesAgo = new Date(Date.now() - 1000 * 60 * 30).getTime();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user