Hello Users,

finally i´d like to create a groovy script, which shows all Build-Blocking 
Entries of an Job. 
Im trying to learn groovy at the moment and my script is only a first 
try  =) 

The entries i want to read per groovy script looks like this in the 
job-Config:
<https://lh3.googleusercontent.com/-WVeWqoeghdE/VbXuYpBSXyI/AAAAAAAAAAU/-l-o_ENcrwI/s1600/job_blocker.png>



At the moment my script should show all properties of each job. But at that 
point i´ve an first issue, the script shows that some Jobs have a 
Build-Blocker Property but the output looks like this:

Class       : class hudson.plugins.project_inheritance.projects.
InheritanceProject
Name        : _StartEnvironment (NEU)
Root Dir    : C:\app\tools\Jenkins\jobs\_StartEnvironment (NEU)
URL         : job/_StartEnvironment%20(NEU)/
Absolute URL: http://scwc37486:8080/job/_StartEnvironment%20(NEU)/
Property: hudson.plugins.buildblocker.BuildBlockerProperty@1872b47
Property: hudson.plugins.throttleconcurrents.ThrottleJobProperty@12a6f35

As far as i understand the script displays the instances of the properties, 
but i´d like to get the Re-Ex-Strings  *".*test.* , .*build.*" *?

How can i get the values of the *"hudson.plugins.buildblocker.*
*BuildBlockerProperty"* ? 

In the javadoc of "job-Property" i haven´t found a method or a atttribute 
therefore ( or probably i haven´t understood it right..)
Unfortunately i haven´t found an example which could help me..
http://javadoc.jenkins-ci.org/hudson/model/JobProperty.html

Thank you for your Support !

Greetz
Michael


My script :

hudson.model.Hudson.instance.items.each{ job ->
  println("Class       : ${job.class}")
  println("Name        : ${job.name}")
  println("Root Dir    : ${job.rootDir}")
  println("URL         : ${job.url}")
  println("Absolute URL: ${job.absoluteUrl}")
  
  jobProperties=job.getAllProperties()
  jobProperties.each{ prop -> 
    println("Property: ${prop}")      
  }  
  println("")
  println("")
  println("")
    
}
  



-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/897ce331-2e22-450e-a13f-15d0bc186f31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to