You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Chris Fouts <ch...@ziftsolutions.com> on 2018/05/29 18:25:19 UTC

Help with docker calls in Groovy

 I days old with Groovy so please bear with me. I bought a Groovy book but
this subject is of course not discussed in it.

We use a Jenkins file to set up stages, and we have this stage

def demoImage
stage("Build ECS Docker Image") {

         dir('demo') {

            docker.withRegistry("https://${dockerUrl}", ecrCredentialsId) {

              demoImage = docker.build("${dockerUrl}/some-name-
${env.EnvironmentKey}-${env.DBName}")

            }

          }
}

I assume demoImage contains some image information, like the image ID that
I need for later? How do I get the image ID from demoImage? Where would
this be documented online? I googled, but I don't necessarily how to look
what I'm looking for.

Thanks,
Chris

Re: Help with docker calls in Groovy

Posted by "Daniel.Sun" <su...@apache.org>.
Hi Chris,

> I assume demoImage contains some image information, like the image ID that
> I need for later? How do I get the image ID from demoImage? Where would
> this be documented online? I googled, but I don't necessarily how to look
> what I'm looking for.

     Your question focuses on the usage of Jenkin(not Groovy programming
language), so I suggest you ask Jenkin community for help.

     If you want to learn more about Groovy, maybe I can help you.

P.S. I'm not familiar with Jenkin...

Cheers,
Daniel.Sun




--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html