Groovy in Jenkins Plugin

16 views
Skip to first unread message

Ning

unread,
Mar 23, 2020, 9:30:32 AM3/23/20
to Jenkins Developers
Hi Guys,

Forgive me if this post is a duplicate or not extremely technical, I am new to Jenkins plugin development and am attempting to make a plugin that gives users information on each node that is connected to a Jenkins server (The plugin runs as a build action). I want to try to make the most of the Hudson.Slave.instances to loop through each slave and output required node information. I have created many groovy based Jenkins jobs in a previous role however my java skills are relatively poor and this is my first Jenkins plugin. I am struggling to integrate a groovy script into my existing basic plugin layout and was wondering if any of you guys had any examples of this being done before or any advice on how to integrate.  

All & any help on the topic would be very much appreciated. 

Cheers,

Ning

Gavin Mogan

unread,
Mar 23, 2020, 3:16:02 PM3/23/20
to jenkin...@googlegroups.com
Have you tried anything so far?

There are some docs/tutorials on https://jenkins.io/participate/code/

Groovy isn't that much different than java, you probably can write java code and don't even know it. There may be support for groovy, but I'd recommend using the native java interfaces. Both the pipeline and freestyle style plugins, at least for the build action, should have access to the computer/agent at build time, and you can store information as needed.

Gavin


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/c86f8c3a-ac08-474d-b5db-fcda52b5a869%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages