本文整理汇总了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;
}