ToolInstallation properties

11 views
Skip to first unread message

Benjamin Terrier

unread,
Apr 24, 2015, 3:31:23 AM4/24/15
to jenkin...@googlegroups.com
Hello everyone,

I'm writing a Builder plugin with a ToolInstallation. I've successfully achieved having the tool to display
in the master and slaves configurations.

Now I need to add a node specific property to my tool installation. This means adding a textbox
in both master and slave config pages and having a way to translate the property according to
the current node (like ToolInstallation.translateFor()).

I've seen that the ToolInstallation class has a list of ToolProperty, but my current understanding
is that only the ToolInstallation home get translated for the Node.

My questions are:
Is there a way to achieve what I trying to do? If so could you give me a hint of where to start or,
even better show me a plugin which already do this?
If it is not possible, a solution could be to add a second ToolInstallation to my Builder plugin as the
property I want to add is a path, but IMHO it would be a bit ugly as this path strongly depends
on my ToolInstallation.

Thanks for you help.

Jesse Glick

unread,
Apr 24, 2015, 4:27:57 AM4/24/15
to Jenkins Dev
On Fri, Apr 24, 2015 at 3:31 AM, Benjamin Terrier <b.te...@gmail.com> wrote:
> I've seen that the ToolInstallation class has a list of ToolProperty, but my
> current understanding
> is that only the ToolInstallation home get translated for the Node.

Correct. According to

https://github.com/search?ref=simplesearch&type=Code&q=user%3Ajenkinsci+%22extends+ToolPropertyDescriptor%22

the only ToolProperty in an OSS plugin is for the auto installer,
which was not designed to be configured in a node property, since if
you are going to configure that you might as well hardcode a location
anyway. (I know of another proprietary implementation which also would
not make sense as a node property.) So I think your issue simply never
came up before.

> Is there a way to achieve what I trying to do?

Provide your own alternative to ToolLocationNodeProperty specialized
for your tool.
Reply all
Reply to author
Forward
0 new messages