Custom search provider for Jenkins search box

109 views
Skip to first unread message

Marcin Zajączkowski

unread,
Nov 22, 2016, 12:21:51 PM11/22/16
to Jenkins Developers
Hi guys,

I like the possibility to search for job and do more complex things in the Jenkins search box [1] such as "foo #53 console". I would like to implement an additional custom logic providing an ability to search by name for views defined in Delivery Pipeline Plugin [2]. Browsing the code I don't see an easy way to plug-in my "search provider", but maybe I missed something.

Is it possible to provide custom "search provider" which would be used to return additional results in the Jenkins search box?


[1] - https://wiki.jenkins-ci.org/display/JENKINS/Search+Box
[2] - https://wiki.jenkins-ci.org/display/JENKINS/Delivery+Pipeline+Plugin

Marcin

--
http://blog.solidsoft.info - Solid Soft - Working code is not enough

Daniel Beck

unread,
Nov 22, 2016, 12:53:32 PM11/22/16
to jenkin...@googlegroups.com

> On 22.11.2016, at 18:21, Marcin Zajączkowski <msz...@wp.pl> wrote:
>
> Is it possible to provide custom "search provider" which would be used to return additional results in the Jenkins search box?

DeliveryPipelineView is a View is an AbstractModelObject is a SearchableModelObject.

I think AbstractModelObject#makeSearchIndex should be the best method to override. Look at its other implementations to see how they add stuff to the search box.

(BTW, I've long thought the 'search' in Jenkins isn't a search, but more a "Launcher" -- now that I've seen the 'QuickSilver' classes, it's obvious what the inspiration was…)

Ullrich Hafner

unread,
Nov 22, 2016, 3:35:47 PM11/22/16
to Jenkins Developers
If you find a way to extend the search box it would be nice if you could share your results in the wiki. I tried several hours without success to get this running for my plugins :-(
> --
> 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/3F79CC23-910D-4852-A491-D73A1E469068%40beckweb.net.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages