devops: change flakiness-dashboard auth to be secret-less (#30488)

This commit is contained in:
Max Schmitt 2024-04-24 22:23:28 +02:00 committed by GitHub
parent 4e086e6df8
commit d5ade91a92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 831 additions and 53 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@ node_modules/
*.swp
*.pyc
.vscode
.mono
.idea
yarn.lock
/packages/playwright-core/src/generated

View File

@ -14,11 +14,11 @@ Azure Functions Core Tools is not available on macOS M1 yet, so we use GitHub Co
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs)-prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list'
apt-get update && apt-get install azure-functions-core-tools-4
apt-get update && apt-get install azure-functions-core-tools-4 sudo
```
- Install Azure CLI:
```bash
curl -sL https://aka.ms/InstallAzureCLIDeb | bash
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
```
- Login to Azure:
```bash

View File

@ -16,6 +16,6 @@
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
"version": "[4.*, 5.0.0)"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -2,11 +2,10 @@
"name": "flakiness-dashboard",
"version": "",
"description": "",
"scripts": {
"test": "echo \"No tests yet...\""
},
"main": "processing/index.js",
"author": "",
"dependencies": {
"@azure/storage-blob": "^12.16.0"
"@azure/identity": "^4.1.0",
"@azure/storage-blob": "^12.17.0"
}
}

View File

@ -1,13 +0,0 @@
{
"version": "2.0",
"extensions": {
"queues": {
"batchSize": 1,
"newBatchThreshold": 0
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
}

View File

@ -13,14 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const { BlobServiceClient } = require("@azure/storage-blob");
// @ts-check
const { DefaultAzureCredential } = require('@azure/identity');
const { BlobServiceClient } = require('@azure/storage-blob');
const defaultAzureCredential = new DefaultAzureCredential();
const zlib = require('zlib');
const util = require('util');
const gzipAsync = util.promisify(zlib.gzip);
const gunzipAsync = util.promisify(zlib.gunzip);
const blobServiceClient = BlobServiceClient.fromConnectionString(process.env.AzureWebJobsStorage);
const AZURE_STORAGE_ACCOUNT = 'folioflakinessdashboard';
const blobServiceClient = new BlobServiceClient(
`https://${AZURE_STORAGE_ACCOUNT}.blob.core.windows.net`,
defaultAzureCredential
);
function flattenSpecs(suite, result = [], titlePaths = []) {
if (suite.suites) {