>
> I have a custom plugin which during the post-build phase needs the 
> hostname/IP address of the node where the build is executing,
>
> build.getExecutor().getOwner().getNode().toComputer().getHostName()
>
> I have been using the above method, but it does not give me the right host 
> name
>

You have not mentioned if your build job is freestyle or pipeline. 

Could you not get node name from environment variable set by the build job?

/Ram 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2e2d1bd0-73f7-4619-9e6f-f50a260dab23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to