Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions EsrpSign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,28 @@ steps:
- pwsh: |
$file = Get-ChildItem -Path "${{ parameters.signOutputPath }}\codesignsummary-*.md" -File
$fileName = $file.Name
Move-Item -Path "${{ parameters.signOutputPath }}\$fileName" -Dest "$(Agent.TempDirectory)\$fileName"
Write-Host "##vso[artifact.upload containerfolder=signingReport;artifactname=signingReport]$(Agent.TempDirectory)\$fileName"
$retryCount = 0
$maxTries = 5
while($retryCount -lt $maxTries)
{
try {
Move-Item -Path "${{ parameters.signOutputPath }}\$fileName" -Dest "$(Agent.TempDirectory)\$fileName" -Force -ErrorAction Stop
Write-Verbose "Moved ${{ parameters.signOutputPath }}\$fileName" -Verbose
Write-Host "##vso[artifact.upload containerfolder=signingReport;artifactname=signingReport]$(Agent.TempDirectory)\$fileName"
}
catch {
$retryCount++
if($retryCount -ge $maxTries)
{
throw
}
Write-Verbose -message "Failed to move ${{ parameters.signOutputPath }}\$fileName, will retry. The error is:" -Verbose
Get-Error $_ -ErrorAction Ignore
Start-Sleep -Seconds ($retryCount * 5)
continue
}
break
}
displayName: ${{ parameters.displayName }} - Upload codesign summary
condition: and(succeeded(), eq(variables['ESRP_TEMPLATE_SHOULD_SIGN'], 'True'))
timeoutInMinutes: 10