Updated version of the groovy script at https://kublr.com/blog/advanced-jenkins-groovy-scripting-for-live-fetching-of-docker-images/ to use describe-images to sort AWS ECR images by date.
Don't forget to update MYREPO
with your repo name and aws region!
Assumption:
- Your Jenkins instance has right IAM role to access AWS ECR.
- Installed Active Choice Parameter or Extended Choice Parameter Plug-In
- Installed awscli on Jenkins instance