8

Is it possible to write Jenkins plugins using Python (via Jython), and if so, where would I get started? I don't know Java (and don't have a real interest in learning it at the moment) so being able to use Python would be nice for me.

ojii
  • 4,729
  • 2
  • 23
  • 34

3 Answers3

4

There's no docs on that. Frankly your problem with be you must understand how the interfaces and extensions map from java to jython to write it.

Here are links on writing Jenkins plugins

Let's you embed either Jython or Python scripts and run them from a plugin If all you nee to do is run a simple script, that be what you need.

MJB
  • 9,352
  • 6
  • 34
  • 49
1

If your goal is to execute Jython code within Jenkins, you may want to have a look at the Jython Plugin.

Starting version 1.6, you can actually install Jython packages (say if you have your own library you'd like to use), and it'll automatically sync up the packages across all Jenkins slaves.

Jack Leow
  • 21,945
  • 4
  • 50
  • 55
0

Since Jython can produce Java classes I see no reason why this should not work.

Note that you will need to learn at least some things about Java (mostly the platform, not necessarily the language) in order to be able to write plugins for Jenkins.

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
  • Yes I completely understand that I'll have to get familiar with the Jenkins/Java platform to be able to do anything. Would you know where to get started (ideally something like a doc/blog post) on using Jython inside Jenkins? – ojii Apr 19 '11 at 09:33