package org.jenkinsci.plugins.p4.tasks; import hudson.FilePath.FileCallable; import hudson.remoting.VirtualChannel; import java.io.File; import java.io.IOException; import java.io.Serializable; import java.net.InetAddress; public class HostnameTask implements FileCallable<String>, Serializable { private static final long serialVersionUID = 1L; public String invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { String hostname = InetAddress.getLocalHost().getHostName(); return hostname; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11628 | Paul Allen | Branching using p4-jenkins-R1.1 | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/tasks/HostnameTask.java | |||||
#1 | 11531 | Paul Allen |
Resolve hostname on the remote slave. Avoid the Node object as resolving DNS on the remote host will be the same way as the Perforce Workspace. |