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; import jenkins.security.Roles; import org.jenkinsci.remoting.RoleChecker; import org.jenkinsci.remoting.RoleSensitive; 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; } public void checkRoles(RoleChecker checker) throws SecurityException { checker.check((RoleSensitive) this, Roles.SLAVE); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 12956 | Sven Erik Knop | Bumped Jenkins version number | ||
#1 | 12955 | Sven Erik Knop | Branching using sknop.p4jenkins-main | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/tasks/HostnameTask.java | |||||
#3 | 12417 | Paul Allen |
Extend Jenkins support back to 1.568 - remove @Override annotations - remove jenkins.security.Roles |
||
#2 | 11626 | Paul Allen |
Workflow support. - Updated the plugin to the latest LTS Jenkins release 1.580.3. - Updated P4Java to 2014.1 Tested with simple ‘static’ workspace, there may be limitations with ‘manual’ workspace. Plan to add DSL support by extending the SCMStep class. #review-11537 JENKINS-24206 |
||
#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. |