Tool Installation (and confluence Labels)

18 views
Skip to first unread message

Gavin Mogan

unread,
Dec 21, 2015, 2:55:50 PM12/21/15
to Jenkins Developers
Hey everyone,

I just saw at the bottom of https://wiki.jenkins-ci.org/display/JENKINS/Tool+Auto-Installation specifically the more tools needed section. Is there a label for this? Is there a list of what labels automatically fill out what pages?

So far I've been doing a bunch of grepping in github to figure out how the various pieces work. I think its a pretty nice little system, other than the ui. I had a few questions though.

For Installable, is there a way to make url dynamic? We have different installable urls per OS. I want one smart object that can be used for all nodes, so for now I've just overrode DownloadFromUrlInstaller Descriptor.getInstallable to create a new object every time with the proper url.

What happens if a specific version gets removed from the json file? Do we have to publish all versions forever using this?

Gavin



Gavin

Christopher Orr

unread,
Dec 21, 2015, 7:17:03 PM12/21/15
to jenkin...@googlegroups.com
Hi there,

On 21/12/15 20:55, Gavin Mogan wrote:
> I just saw at the bottom
> of https://wiki.jenkins-ci.org/display/JENKINS/Tool+Auto-Installation
> specifically the more tools needed section. Is there a label for this?
> Is there a list of what labels automatically fill out what pages?

Not quite sure I fully understand the question, but I don't believe
there are any labels on the wiki relating to tool installers.


> So far I've been doing a bunch of grepping in github to figure out how
> the various pieces work. I think its a pretty nice little system, other
> than the ui. I had a few questions though.
>
> For Installable, is there a way to make url dynamic? We have different
> installable urls per OS. I want one smart object that can be used for
> all nodes, so for now I've just overrode DownloadFromUrlInstaller
> Descriptor.getInstallable to create a new object every time with the
> proper url.

The URLs are stored in a JSON file, which is refreshed daily by Jenkins.
The URL to a particular tool version is usually associated with a tool
ID and name. In many cases, where the tool is cross-platform, the JSON
file is quite simple:
http://updates.jenkins-ci.org/updates/hudson.tasks.Ant.AntInstaller.json

However, some plugins provide multiple URLs for a given tool ID, where
multiple platforms and/or CPU architectures are supported, e.g.
http://updates.jenkins-ci.org/updates/org.jenkinsci.plugins.golang.GolangInstaller.json

i.e. The URL to use is decided at runtime, based on the type of machine
the build is running on.

The JDK installer goes a step further and groups the items by Java major
version, then individual releases, then individual installers per
platform and CPU architecture:
http://updates.jenkins-ci.org/updates/hudson.tools.JDKInstaller.json

So those might be good installer plugins to grep on (the JDK installer
is in Jenkins core).


> What happens if a specific version gets removed from the json file? Do
> we have to publish all versions forever using this?

If you don't want to break people's builds, yes, pretty much.

If one day the JSON file contains "Foobar 1.5" and somebody configures a
job with to install that tool, then if you remove "Foobar 1.5" from the
JSON in a later update, that user's build will likely fail in a
situation where the tool needs to be installed (though this isn't
something I've seen or tested myself).

Regards,
Chris
Reply all
Reply to author
Forward
0 new messages