Configure Jenkins JDK installations programmatically

So, I am looking for a JenK JKK software installation programmatically, either through the CLI or by writing XML files.

I know that I can make changes to the config.xml file (main) to enable JDK installations, but I would prefer it to be configured in a separate file. (e.g. hudson.tasks.Ant.xml)

Does anyone have any ideas on how to achieve this?

+4
source share
1 answer

I managed to do this :) Just call it: jenkins.model.Jenkins.getInstance().getJDKs().add(new hudson.model.JDK("id", "path"))

+4
source

All Articles