24

I would like to use the jenkins script console some more.

Where do I have to look in order to find a list of available Objects/Methods that I can use via groovy? Is there something online? Should I browse the source on Github? Where would I start?

Like in this example, how would I have known that hudson.model.Hudson.instance.pluginManager.plugins exists and is ready to be called from the jenkins script console?

println(hudson.model.Hudson.instance.pluginManager.plugins)

Thanks!

Meredith
  • 3,928
  • 4
  • 33
  • 58
nemoo
  • 3,269
  • 4
  • 38
  • 51

2 Answers2

20

You are looking for Jenkins Main Module API.

You may find this answer helpful in getting yourself on your way.

Community
  • 1
  • 1
malenkiy_scot
  • 16,415
  • 6
  • 64
  • 87
3

You can enter a groovy script in the script console.

The complete API can be found at the jenkins javadoc.

mtk
  • 13,221
  • 16
  • 72
  • 112