From ab660397e9d2195d303de4d4e49257e6a3357d1c Mon Sep 17 00:00:00 2001 From: Abdalaziz Mohamed Date: Tue, 11 Jun 2024 13:38:27 +0200 Subject: [PATCH] fix: update repo link to image link --- scripts/script.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/script.sh b/scripts/script.sh index 6a42320..b5f7d24 100755 --- a/scripts/script.sh +++ b/scripts/script.sh @@ -38,7 +38,9 @@ else _scan_repo_name="image/${ECR_REPO_NAME}" fi +# Get the image digest _image_digest=$(aws --region "${AWS_REGION}" ecr describe-images --repository-name "${_scan_repo_name}" --image-ids imageTag="${ECR_REPO_TAG}" --query 'imageDetails[].imageDigest' --output text) +# Get the image scan link _scan_repo_link="https://${SSO_PREFIX}.awsapps.com/start/#/console?account_id=${AWS_ACCOUNT_ID}&role_name=${SSO_ROLE}&destination=https%3A%2F%2F${AWS_REGION}.console.aws.amazon.com%2Fecr%2Frepositories%2Fprivate%2F${AWS_ACCOUNT_ID}%2F${_scan_repo_name}%2F_%2Fimage%2F${_image_digest}%2Fdetails%3Fregion%3D${AWS_REGION}" log_info "Fetching scan results from ECR"