Compare commits
2 Commits
0a9c026b1b
...
99f848b34d
| Author | SHA1 | Date | |
|---|---|---|---|
| 99f848b34d | |||
| 5895b93b12 |
@@ -91,11 +91,6 @@ jobs:
|
||||
--image-scanning-configuration scanOnPush=true \
|
||||
--encryption-configuration encryptionType=AES256 >/dev/null
|
||||
|
||||
aws ecr get-login-password --region "${AWS_REGION}" \
|
||||
| docker login --username AWS --password-stdin "${ecr_registry}"
|
||||
|
||||
docker tag "${IMAGE_NAME}:prod-${GITHUB_SHA}" "${ecr_image}:latest"
|
||||
|
||||
retry() {
|
||||
for attempt in 1 2 3; do
|
||||
if "$@"; then
|
||||
@@ -107,6 +102,14 @@ jobs:
|
||||
sleep "$((attempt * 5))"
|
||||
done
|
||||
}
|
||||
|
||||
ecr_login() {
|
||||
aws ecr get-login-password --region "${AWS_REGION}" \
|
||||
| docker login --username AWS --password-stdin "${ecr_registry}"
|
||||
}
|
||||
|
||||
retry ecr_login
|
||||
docker tag "${IMAGE_NAME}:prod-${GITHUB_SHA}" "${ecr_image}:latest"
|
||||
retry docker push "${ecr_image}:latest"
|
||||
|
||||
untagged_image_ids="$(aws ecr list-images \
|
||||
|
||||
Reference in New Issue
Block a user