title: Make Jenkins get list of images from GCP and display as list
body: <p>I'v been sending new versions of app in docker images to GCP Container Registry, now I wanted to create a jenkins job that when picked <code>Build with Parameters</code> gives you a list of let's say last 15 tagged images, and let's you choose which version of app to deploy - the entire logic how to deploy etc. I can handle, but I'v been thinking how to <code>live</code> display those versions, anyone have any idea ? I know about the <code>Active Choice Parameter</code> and there is a Groovy Script section - I used it before to list GIT Branches - but not sure how to authenticate to GCP and run</p>
  <pre class="lang-sh prettyprint-override"><code>gcloud container images list-tags gcr.io/my/image
  </code></pre>
  <p>inside the Groovy Script or some other alternative</p>
  <hr />
  <p>EDIT:</p>
  <p>I see the <a href="https://blog.mikesir87.io/2016/04/pushing-to-ecr-using-jenkins-pipeline-plugin/" rel="nofollow noreferrer">Amazon</a> version of plugin that can do it, but no sight of GCP one. So I guess good old scripts are the only option.</p>
  <p>I think I Know the answer and will just have to create Service Account for it but maybe someone will come with better solution</p>