From 2a82c87696b1908cad48a29703878e50618d582e Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 3 Sep 2024 01:11:38 -0700 Subject: [PATCH] Added fixes for build environment and npm log level --- .github/workflows/azure-ipam-build.yml | 3 +++ tools/build.ps1 | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/azure-ipam-build.yml b/.github/workflows/azure-ipam-build.yml index 3cec1e7..fad38e7 100644 --- a/.github/workflows/azure-ipam-build.yml +++ b/.github/workflows/azure-ipam-build.yml @@ -16,6 +16,7 @@ jobs: init: name: Initialize Azure IPAM Build runs-on: ubuntu-latest + environment: production outputs: ipamVersion: ${{ steps.extractVersion.outputs.ipamVersion }} steps: @@ -34,6 +35,7 @@ jobs: build: name: Build Azure IPAM Containers runs-on: ubuntu-latest + environment: production needs: [ init ] steps: - name: Azure Login @@ -61,6 +63,7 @@ jobs: build-legacy: name: Build Legacy Azure IPAM Containers runs-on: ubuntu-latest + environment: production needs: [ init ] steps: - name: Azure Login diff --git a/tools/build.ps1 b/tools/build.ps1 index 9a2b0d0..de69f52 100644 --- a/tools/build.ps1 +++ b/tools/build.ps1 @@ -154,17 +154,17 @@ try { Write-Host "INFO: Running NPM Install..." -ForegroundColor Green - # Build Azure IPAM UI + # Install Azure IPAM UI Dependencies $npmInstallErr = $( - $npmInstall = npm ci --no-progress --no-update-notifier --no-fund + $npmInstall = npm ci --no-progress --no-update-notifier --no-fund --loglevel error ) 2>&1 # Switch back to original dir Pop-Location - # Exit if NPM Build fails + # Exit if NPM Install fails if($npmInstallErr) { - Write-Host "ERROR: NPM Build failed!" -ForegroundColor red + Write-Host "ERROR: NPM Install failed!" -ForegroundColor red throw $npmInstallErr } @@ -183,7 +183,7 @@ try { # Exit if NPM Build fails if($npmBuildErr) { - Write-Host "ERROR: NPM Install failed!" -ForegroundColor red + Write-Host "ERROR: NPM Build failed!" -ForegroundColor red throw $npmBuildErr }