How t access job details from plugin

24 views
Skip to first unread message

Samith Dassanayake

unread,
May 7, 2015, 3:18:46 AM5/7/15
to jenkin...@googlegroups.com
Hi all,
I am new to jenkins plugin development and I want to access job data from a jenkins plugin. 
For an example I want to get lastCompletedBuild, lastCompletedBuild id, lastCompletedBuild url , lastCompletedBuild ,lastCompletedBuild id , lastCompletedBuild url etc...
How can get the job and access those data from a plugin.. All I have is job name. Please help me

Thanks,
Samith

Robert Sandell

unread,
May 7, 2015, 5:12:44 AM5/7/15
to jenkin...@googlegroups.com
Jenkins.getInstance().getItemByFullName("name", Job.class).getLastCompletedBuild().getId()

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/cd926022-ea56-414e-b3bc-7e5b5b9cc27f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.
Reply all
Reply to author
Forward
0 new messages