Re: Remote host IP

19 views
Skip to first unread message

Christopher Orr

unread,
Jul 23, 2015, 8:59:21 PM7/23/15
to jenkins...@googlegroups.com
On 24/07/15 01:02, Mandy wrote:
> Jenkins build log shows "Started by remote host xx.xx.xx.xx". Is there a
> way to access this IP address in a groovy script?

I imagine something like this should work, if you're using the Groovy
Script plugin:

build.getCauses().grep(hudson.model.Cause.RemoteCause).each {
println it.getAddr()
}

Regards,
Chris

Mandy

unread,
Jul 24, 2015, 2:50:52 PM7/24/15
to Jenkins Users, ch...@orr.me.uk
Thank you! That worked.
Reply all
Reply to author
Forward
0 new messages