Hi All

Im new to jenkins and we have a Groovy script that get successful build 
information. Now, we have this bit that iterates over it.badgeActions. 
Suddenly Im seeing that badgeAction empty. When I check some old builds, it 
has an array of 

[hudson.plugins.git.GitTagAction@455c11af]

If I remove the it.badgeActions.each  loop, I see the build numbers. 
Firstly, what is is the "it" in def build = it and what the hell is a 
badgeAction and should I be concerned its empty?

Thanks for any help

def job = 
jenkins.model.Jenkins.instance.getItemByFullName("${imageTag}/release%2F2.177.0")
job.builds.each {
def build = it

  println "${it.getResult()}"
if (it.getResult().toString().equals("SUCCESS")) {
  println "${it.badgeActions}"
    it.badgeActions.each {
      println "${build.displayName}"
            builds.add(build.displayName[0..-1])
    }
    
  }
}

builds.unique();

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/31744ee5-b683-4c9f-b45f-b617176edd79n%40googlegroups.com.

Reply via email to