Skip to content

Commit

Permalink
trying the start-process command#5
Browse files Browse the repository at this point in the history
  • Loading branch information
catelleempei-eaton committed Aug 21, 2024
1 parent d2540ea commit d2c8fdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 4 additions & 2 deletions images/windows/scripts/build/Install-CoverityClient.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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




7 changes: 1 addition & 6 deletions images/windows/templates/windows-2022-coverity-base.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d2c8fdb

Please sign in to comment.