Remote Api to update Plugin xml

33 views
Skip to first unread message

James Richard

unread,
Dec 1, 2014, 11:56:50 AM12/1/14
to jenkin...@googlegroups.com
Hey Everyone,
  I was wondering if there was a way to expose the global xml file of a plugin so that a User could update the xml using Rest Api's?  

Referencing https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API, I have found out how to update Job config.xml files but I want to also be able to update the global xml file for my plugin (as a Jenkins administrator) using a remote api.  Is there a way to do this? Any suggestions?

Robert Sandell

unread,
Dec 1, 2014, 12:45:31 PM12/1/14
to jenkin...@googlegroups.com
This is how it's implemented in core


You should be able to implement something similar for your own plugin.

/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/388b7bf9-ef24-4ab8-8444-1e619770a54a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.

Jesse Glick

unread,
Dec 1, 2014, 1:06:03 PM12/1/14
to Jenkins Dev
On Mon, Dec 1, 2014 at 11:56 AM, James Richard <jamesri...@gmail.com> wrote:
> the global xml file for my plugin

Storing anything in Plugin is deprecated. If you are storing content
in a Descriptor, there is no standardized doConfigDotXml equivalent
that I know of; it is up to each plugin that wishes to expose such an
API to do so in its own way.

James Richard

unread,
Dec 3, 2014, 9:58:11 AM12/3/14
to jenkin...@googlegroups.com
Thank you Robert, I implemented something similiar and now I am able to expose the Descriptor's configuration.


Sorry for the confusion Jesse,  I was storing the information in the Descriptor not the plugin itself. I implemented my doConfigDotXml to expose the information to Rest services.

Thank you for the help guys!
Reply all
Reply to author
Forward
0 new messages