From 0b4551f90466125c72b44f127f43ea3e0b9b91ab Mon Sep 17 00:00:00 2001 From: Mohamed ElAsmar Date: Tue, 4 Jul 2023 16:35:04 -0700 Subject: [PATCH] chore: use amazon ecr credential helper in windows appveyor --- appveyor-windows.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/appveyor-windows.yml b/appveyor-windows.yml index 886e65e0c4..28567c956f 100644 --- a/appveyor-windows.yml +++ b/appveyor-windows.yml @@ -134,7 +134,14 @@ install: # Echo final Path - "echo %PATH%" - - "IF DEFINED BY_CANARY ECHO Logging in Public ECR && aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws" + # use amazon-ecr-credential-helper + - choco install amazon-ecr-credential-helper + - ps: " + $docker_config = Get-Content $env:HOME/.docker/config.json -raw | ConvertFrom-Json; + $docker_config.credsStore = 'ecr-login'; + $docker_config | ConvertTo-Json | set-content $env:HOME/.docker/config.json; + " + - ps: "get-content $env:HOME/.docker/config.json" # claim some disk space before starting the tests - "docker system prune -a -f"