Thanks Rajendra.
Post by RAJENDRA PRASADprintln it.name + " - " + it.class
def jobBuilds=it.getBuilds()
//for each of such jobs we can get all the builds (or you can limit the
number at your convenience)
jobBuilds.each { build ->
def runningSince = groovy.time.TimeCategory.minus( new Date(),
build.getTime() )
def currentStatus = build.buildStatusSummary.message
def cause = build.getCauses()[0]
${currentStatus} | Cause: ${cause}"
// You can get all the information available for build parameters.
def parameters = build.getAction(ParametersAction)?.parameters
parameters.each {
println "Type: ${it.class} Name: ${it.name}, Value: ${it.dump()}"
}
}
}
ERROR: Build step failed with exception
Script1
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
at
org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)
at Script1.run(Script1.groovy:1)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
at
org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript.evaluate(SecureGroovyScript.java:343)
at hudson.plugins.groovy.SystemGroovy.run(SystemGroovy.java:95)
at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:59)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1815)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Execute system Groovy script' marked build as failure
Post by RAJENDRA PRASADHi Tripti,
You are correct there is no plugin that can help you to create a custom
dashboard specified by you.
All you need to write a groovy script to access Jenkins job history and
prepare report according to your need
Jenkins.instance.getAllItems(Job.class).each{
println it.name + " - " + it.class
}
https://github.com/cloudbees/jenkins-scripts/blob/master/get-build-information.groovy
You need to use groovy plugin and it looks like below link.
https://www.google.com/search?safe=active&q=jenkins+groovy+script+examples&sa=X&ved=2ahUKEwj-weOYx8TeAhXEtI8KHbCMABQQ1QIoA3oECAoQBA&biw=412&bih=660&dpr=2.63#imgrc=qnNClrZNVTUKnM
I know I didn't have you full solution but I hope this will give some
direction for to implement your requirement.
Thanks
Rajendra
Post by trupti bhatt[image: enter image description here]
<https://i.stack.imgur.com/JLX16.png>
so which plugin will help me to get such kind of report?
I have tried multiple plugins, but no luck. I have tried test analyzer
report, dashboard view and jenkins matrix and trends plugin.
I think Groovy scripts may help. can anyone help me on it?
Thank you,
Trupti Bhatt
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/291de8a3-6bf5-4d5e-ae15-625044d11aaa%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/291de8a3-6bf5-4d5e-ae15-625044d11aaa%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.