Skip to content

Instantly share code, notes, and snippets.

@gwsu2008
Created February 17, 2020 17:09
Show Gist options
  • Save gwsu2008/38339ad133786f0c19d43538234ad009 to your computer and use it in GitHub Desktop.
Save gwsu2008/38339ad133786f0c19d43538234ad009 to your computer and use it in GitHub Desktop.
jenkins.parameter.list.groovy
import groovy.json.JsonSlurper
def cmd = 'aws ecr describe-images --repository-name repo_name --query "sort_by(imageDetails,& imagePushedAt)[].imageTags[]"'
def ecr_images_json = cmd.execute()
def data = new JsonSlurper().parseText(ecr_images_json.text)
def ecr_images = []
println (data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment