本文整理匯總了Java中hudson.model.Node.createPath方法的典型用法代碼示例。如果您正苦於以下問題:Java Node.createPath方法的具體用法?Java Node.createPath怎麽用?Java Node.createPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類hudson.model.Node
的用法示例。
在下文中一共展示了Node.createPath方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getExecutable
import hudson.model.Node; //導入方法依賴的package包/類
public static String getExecutable(String name, AppScanSourceCommand command, Node node, TaskListener listener, EnvVars env) throws IOException, InterruptedException {
if (name != null) {
Jenkins j = Jenkins.getInstance();
if (j != null) {
for (AppScanSourceInstallation tool : j.getDescriptorByType(DescriptorImpl.class).getInstallations()) {
if (tool.getName().equals(name)) {
if (node != null) {
tool = tool.forNode(node, listener);
}
if (env != null) {
tool = tool.forEnvironment(env);
}
String home = Util.fixEmpty(tool.getHome());
if (home != null) {
if (node != null) {
FilePath homePath = node.createPath(home);
if (homePath != null) {
return homePath.child(command.getName()).getRemote();
}
}
return home + "/" + command.getName();
}
}
}
}
}
return command.getName();
}
示例2: getExecutable
import hudson.model.Node; //導入方法依賴的package包/類
public static String getExecutable(String name, AnsibleCommand command, Node node, TaskListener listener, EnvVars env) throws IOException, InterruptedException {
if (name != null) {
Jenkins j = Jenkins.getInstance();
if (j != null) {
for (AnsibleInstallation tool : j.getDescriptorByType(DescriptorImpl.class).getInstallations()) {
if (tool.getName().equals(name)) {
if (node != null) {
tool = tool.forNode(node, listener);
}
if (env != null) {
tool = tool.forEnvironment(env);
}
String home = Util.fixEmpty(tool.getHome());
if (home != null) {
if (node != null) {
FilePath homePath = node.createPath(home);
if (homePath != null) {
return homePath.child(command.getName()).getRemote();
}
}
return home + "/" + command.getName();
}
}
}
}
}
return command.getName();
}
示例3: getExecutable
import hudson.model.Node; //導入方法依賴的package包/類
/**
* Gets the executable name to use for a given launcher.
* Suitable for the first item in {@link ArgumentListBuilder}.
* @param name the name of the selected tool, or null for the default
* @param node optionally, a node (such as a slave) on which we are running Docker
* @param listener a listener, required in case {@code node} is not null
* @param env optionally, environment variables to use when expanding the home directory
* @return {@code docker} or an absolute path
*/
public static @Nonnull String getExecutable(@CheckForNull String name, @CheckForNull Node node, @Nullable TaskListener listener, @CheckForNull EnvVars env) throws IOException, InterruptedException {
if (name != null) {
Jenkins j = Jenkins.getInstance();
if (j != null) {
for (DockerTool tool : j.getDescriptorByType(DescriptorImpl.class).getInstallations()) {
if (tool.getName().equals(name)) {
if (node != null) {
tool = tool.forNode(node, listener);
}
if (env != null) {
tool = tool.forEnvironment(env);
}
String home = Util.fixEmpty(tool.getHome());
if (home != null) {
if (node != null) {
FilePath homeFP = node.createPath(home);
if (homeFP != null) {
return homeFP.child("bin/docker").getRemote();
}
}
return home + "/bin/docker";
}
}
}
}
}
return COMMAND;
}