From d2c8fdb5f1b600e259ea5da9afd94cf2431bb08c Mon Sep 17 00:00:00 2001 From: catelleempei Date: Wed, 21 Aug 2024 08:31:23 -0400 Subject: [PATCH] trying the start-process command#5 --- images/windows/scripts/build/Install-CoverityClient.ps1 | 6 ++++-- .../windows/templates/windows-2022-coverity-base.pkr.hcl | 7 +------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/images/windows/scripts/build/Install-CoverityClient.ps1 b/images/windows/scripts/build/Install-CoverityClient.ps1 index a86c5e980cdf..8e45491362de 100644 --- a/images/windows/scripts/build/Install-CoverityClient.ps1 +++ b/images/windows/scripts/build/Install-CoverityClient.ps1 @@ -5,7 +5,7 @@ # Define the source URL and destination path - $sourceUrl="https://stsmpdevopsimages.blob.core.windows.net/armimagelayeraddons/synopsys/coverity/cov-analysis-win64-2024.3.1.exe?sp=r&st=2024-08-21T02:20:59Z&se=2024-08-21T10:20:59Z&spr=https&sv=2022-11-02&sr=b&sig=AbEd8GEawLUr4TKjBZw7Y3cHtNXeN0Z5dSkFGKaiJqU%3D" + $sourceUrl="https://stsmpdevopsimages.blob.core.windows.net/armimagelayeraddons/synopsys/coverity/cov-analysis-win64-2024.3.1.exe?sp=r&st=2024-08-21T12:29:31Z&se=2024-08-21T20:29:31Z&spr=https&sv=2022-11-02&sr=b&sig=wXDjreSkZys8eudfSx4wZ1ZiLxMBSRL5tly7w%2BqlAPI%3D" $destinationPath = "C:\temp/cov-analysis-win64-2024.3.1.exe" if (-not (Get-Command azcopy -ErrorAction SilentlyContinue)) { @@ -20,7 +20,9 @@ if (-not (Get-Command azcopy -ErrorAction SilentlyContinue)) { } # Install the Coverity client -Start-Process -FilePath "c:\temp\cov-analysis-win64-2024.3.1.exe" -WorkingDirectory "c:\temp" -ArgumentList "-q", "--license.region=1","--license.agreement=agree","--license.cov.path=c:\image\scripts\build\license.dat" +Start-Process -FilePath "c:\temp\cov-analysis-win64-2024.3.1.exe" -WorkingDirectory "c:\temp" -ArgumentList "-q", "--license.region=1","--license.agreement=agree","--license.cov.path=c:\image\scripts\build\license.dat" +Start-Sleep -Seconds 360 + \ No newline at end of file diff --git a/images/windows/templates/windows-2022-coverity-base.pkr.hcl b/images/windows/templates/windows-2022-coverity-base.pkr.hcl index b56c22761bd6..47326763e4bd 100644 --- a/images/windows/templates/windows-2022-coverity-base.pkr.hcl +++ b/images/windows/templates/windows-2022-coverity-base.pkr.hcl @@ -287,12 +287,7 @@ build { # inline = ["bcdedit.exe /set TESTSIGNING ON"] # } - provisioner "powershell" { - inline = [ - "Write-Output 'Applying license...'", - "C:\image\scripts\build\license.dat" - ] - } + # provisioner "powershell" { # environment_vars = ["IMAGE_VERSION=${var.image_version}", "IMAGE_OS=${var.image_os}", "AGENT_TOOLSDIRECTORY=${var.agent_tools_directory}", "IMAGEDATA_FILE=${var.imagedata_file}", "IMAGE_FOLDER=${var.image_folder}"] # execution_policy = "unrestricted"