Skip to content

Commit eb63833

Browse files
authored
Fixing issue with pipeline still succeeds with error in compilation (Azure#25784)
* Halting after LASTEXITCODE fails * Testing * NIT * Final
1 parent d4f041e commit eb63833

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

eng/pipelines/templates/steps/compilation.check.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ steps:
2828
foreach ($retry in 0..${{ parameters.RetryLimit }}) {
2929
Write-Host "mvn --no-transfer-progress -f $pomf compile"
3030
mvn --no-transfer-progress -f $pomf compile
31-
if (!$LASTEXITCODE) { break }
31+
if (!$LASTEXITCODE -or ($retry -ge ${{ parameters.RetryLimit }})) { break }
3232
Write-Host "Install failed, retrying in 1 minute..."
33-
sleep 60
33+
Start-Sleep -s 60
3434
}
35+
3536
exit $LASTEXITCODE
3637
3738
workingDirectory: ${{parameters.ArtifactDirectory}}

0 commit comments

Comments
 (0)