Do plugins do anything to support Jenkins agents?

55 views
Skip to first unread message

Christian McHugh

unread,
Mar 21, 2017, 10:25:00 AM3/21/17
to Jenkins Developers
When developing a Jenkins plugin, are there any additional steps necessary to support the plugin running on a Jenkins agent, rather than the master node? 

I've gotten bug reports https://github.com/jenkinsci/saltstack-plugin/issues/47 for a plugin which does an http call to an external service. The reporters state that when using the "Restrict where this project can be run" job option the plugin still appears to run from the Jenkins master. Reportedly, from the master the external DNS name should be X, while from the agent, it should resolve as Y. But when the job is configured to run from the agent, they still are only able to get the communication to work when using name X.

Does the salt plugin need to be adjusted to support running from an agent? 

Thanks all

Baptiste Mathus

unread,
Mar 22, 2017, 6:37:32 AM3/22/17
to Jenkins Developers

--
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-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b9549d47-cf79-4fff-8855-ef6cfd59114a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian McHugh

unread,
Mar 26, 2017, 5:49:07 AM3/26/17
to Jenkins Developers, m...@batmat.net
That was helpful to get started. Based on that (and many github searches for examples) I have a branch which seems to do the job:

This plugin really comes down to parsing the jenkins form, sends off an http request, and then parses the response for errors. I've wrapped the http request section in a channel.call, as that is the bit that needs to be localized to the agent in the case of hostname or firewall rules. 

If anyone is able to review, I'd love to get feedback. 

Thanks all!

Oleg Nenashev

unread,
Mar 27, 2017, 3:31:40 AM3/27/17
to Jenkins Developers, m...@batmat.net
Thanks for doing it. When I was trying the plugin, it also was a serious issue in my case. I have added several comments to the pull-request.

Best regards,
Oleg

воскресенье, 26 марта 2017 г., 11:49:07 UTC+2 пользователь Christian McHugh написал:
Reply all
Reply to author
Forward
0 new messages