How to get TaskListener or BuildListener

18 views
Skip to first unread message

selva vignesh

unread,
Nov 13, 2019, 5:30:13 AM11/13/19
to Jenkins Developers
Hi,
Can anyone please help me to get TaskListener or BuildListerner from job object or item Object

Any sample snippet available.

Thanks in advance

Robert Sandell

unread,
Nov 13, 2019, 6:35:06 AM11/13/19
to Jenkins Developer List
There is no specific one to get. A TaskListener is created for a build when it starts, so from the job or item level there isn't one to use.
If you need an instance to send as a parameter to some api call you can for example use something like TaskListener.NULL or instantiate a new LogTaskListener.

/B

--
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/2d555f5d-ce9f-4ec0-a194-22fbf4df84dd%40googlegroups.com.


--
Robert Sandell
Software Engineer
CloudBees, Inc.
CloudBees-Logo.png
Twitter: robert_sandell

selva vignesh

unread,
Nov 13, 2019, 7:03:13 AM11/13/19
to jenkin...@googlegroups.com
Hi Robert
Thanks for the information.
Is there any detailed document available for Jenkins plugin development?

Ullrich Hafner

unread,
Nov 13, 2019, 10:54:45 AM11/13/19
to Jenkins Developers

Mark Waite

unread,
Nov 13, 2019, 1:02:07 PM11/13/19
to jenkinsci-dev
I agree with Ulli that  https://jenkins.io/doc/developer/   is the first reference.  In case it helps, https://jenkins.io/blog/2017/08/07/intro-to-plugin-development/  provides links to some items outside jenkins.io.



--
Thanks!
Mark Waite
Reply all
Reply to author
Forward
0 new messages