From d97dcf388a7e5ac6deab593309d6c54ae4ef80ee Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Fri, 7 Jun 2024 11:46:30 +0200 Subject: [PATCH] build: add missing `ELECTRON_ARTIFACTS_BLOB_STORAGE` env var (#42402) build: add missing ELECTRON_ARTIFACTS_BLOB_STORAGE env var --- .github/workflows/macos-build.yml | 1 + script/lib/azput.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 0e41aea2a16f..66b5bbab9ca4 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -34,6 +34,7 @@ env: AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }} AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} AZURE_STORAGE_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }} + ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }} ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }} ELECTRON_GITHUB_TOKEN: ${{ secrets.ELECTRON_GITHUB_TOKEN }} GN_CONFIG: ${{ inputs.GN_CONFIG }} diff --git a/script/lib/azput.js b/script/lib/azput.js index fcdf40419271..d6880aed3bdc 100644 --- a/script/lib/azput.js +++ b/script/lib/azput.js @@ -5,7 +5,13 @@ const path = require('node:path'); // TODO(vertedinde): This variable is a test variable in GHA, sending test // artifacts to a test account. Change to the real electron artifacts // storage account when ready. -const blobServiceClient = BlobServiceClient.fromConnectionString(process.env.ELECTRON_ARTIFACTS_BLOB_STORAGE); +const { ELECTRON_ARTIFACTS_BLOB_STORAGE } = process.env; +if (!ELECTRON_ARTIFACTS_BLOB_STORAGE) { + console.error('Missing required ELECTRON_ARTIFACTS_BLOB_STORAGE environment variable.'); + process.exit(1); +} + +const blobServiceClient = BlobServiceClient.fromConnectionString(ELECTRON_ARTIFACTS_BLOB_STORAGE); const args = require('minimist')(process.argv.slice(2));