Skip to content

Commit

Permalink
[BARX-677] Add retry to docker logins for windows jobs (#31027)
Browse files Browse the repository at this point in the history
  • Loading branch information
AliDatadog authored Nov 13, 2024
1 parent bd103eb commit 6100d90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/ci/docker-login.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ErrorActionPreference = "Stop"
# ECR Login
$AWS_ECR_PASSWORD = (aws ecr get-login-password --region us-east-1)
docker login --username AWS --password "${AWS_ECR_PASSWORD}" 486234852809.dkr.ecr.us-east-1.amazonaws.com
powershell -Command "$(Get-Location)\tools\ci\retry.ps1 docker login --username AWS --password ${AWS_ECR_PASSWORD} 486234852809.dkr.ecr.us-east-1.amazonaws.com"
If ($lastExitCode -ne "0") {
throw "Previous command returned $lastExitCode"
}
Expand All @@ -20,7 +20,7 @@ If ($lastExitCode -ne "0") {
}
$DOCKER_REGISTRY_PWD = $(cat "$tmpfile")
Remove-Item "$tmpfile"
docker login --username "${DOCKER_REGISTRY_LOGIN}" --password "${DOCKER_REGISTRY_PWD}" "docker.io"
powershell -Command "$(Get-Location)\tools\ci\retry.ps1 docker login --username ${DOCKER_REGISTRY_LOGIN} --password ${DOCKER_REGISTRY_PWD} docker.io"
If ($lastExitCode -ne "0") {
throw "Previous command returned $lastExitCode"
}

0 comments on commit 6100d90

Please sign in to comment.