Skip to content

Commit

Permalink
Revert "Add retry to signtool" (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Jun 3, 2020
1 parent 4ebb496 commit 3e5efb2
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions msi/build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,7 @@ Get-ChildItem .\bin\Release -Filter *.msi -Recurse |
Write-Host "Signing installer"
# always disable tracing here
Set-PSDebug -Trace 0
$retries = 10
$i = $retries
for(; $i -gt 0; $i--) {
$p = Start-Process -Wait -PassThru -NoNewWindow -FilePath "signtool.exe" -ArgumentList "sign /v /f `"${env:PKCS12_FILE}`" /p ${env:SIGN_STOREPASS} /t http://timestamp.verisign.com/scripts/timestamp.dll /d `"Jenkins Automation Server ${JenkinsVersion}`" /du `"https://jenkins.io`" $_.FullName"
$p.WaitForExit()
# we will retry up to $retries times until we get a good exit code
if($p.ExitCode -eq 0) {
break
} else {
Start-Sleep -Seconds 10
}
}

if($i -le 0) {
Write-Error "signtool did not complete successfully after $retries tries"
exit -1
}

signtool sign /v /f $env:PKCS12_FILE /p $env:SIGN_STOREPASS /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Jenkins Automation Server ${JenkinsVersion}" /du "https://jenkins.io" $_.FullName
if($UseTracing) { Set-PSDebug -Trace 1 }

Write-Host "Checking the signature"
Expand Down

0 comments on commit 3e5efb2

Please sign in to comment.