Hi, I'm exploring the Jenkins source code a bit to learn its internals and 
perhaps in the future be able to contribute a bit. I've written a couple of 
simple test-plugins during my exploration.

Right now I'm looking into how to write a plugin for blue ocean, and I've 
got some simple stuff working, like adding a rest endpoint (By 
implementing io.jenkins.blueocean.rest.ApiRoutable), adding a link to the 
pipeline page with the jenkins.pipeline.detail.header.action extension 
point and adding a route using the jenkins.main.routes extension point. But 
this has led me to some things I'm not sure how to do, so here goes:

 - How do you add a route in the existing hierarchy of the routing table? I 
could add a separate route using the jenkins.main.routes extension point 
but that falls completely outside of the existing hierarchy so (unless I'm 
mistaken) you lose all context (which organization, pipeline, run you're 
in).
 - I added an Action to a Job via a TransientActionFactory and annotated 
the Action with @ExportedBean, I could now get rest data by implementing 
@TreeResponse @GET @WebMethod(name = "") public Object getSomeData() { ... 
} on the action. This seems to work, but the actions property in the 
/blue/rest/organizations/jenkins/pipelines/mypipeline/ seems to not work, 
instead of 
/blue/rest/organizations/jenkins/pipelines/mypipeline/my-action-url I need 
to go to 
/blue/rest/organizations/jenkins/pipelines/mypipeline/actions/1/action 
(where 1 is the index of the action in the actions property). Is this 
something that still needs to be fixed or am I doing it wrong?
 

-- 
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-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/411d3534-e306-4be0-bdaf-430a40d36000%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to