Package hudson

Examples of hudson.FilePath.child()


                if(!ws.exists()) {// no workspace. can't check
                    ok();
                    return;
                }

                if(ws.child(value).exists()) {
                    if (expectingFile) {
                        if(!ws.child(value).isDirectory())
                            ok();
                        else
                            error(value+" is not a file");
View Full Code Here


                    return;
                }

                if(ws.child(value).exists()) {
                    if (expectingFile) {
                        if(!ws.child(value).isDirectory())
                            ok();
                        else
                            error(value+" is not a file");
                    } else {
                        if(ws.child(value).isDirectory())
View Full Code Here

                        if(!ws.child(value).isDirectory())
                            ok();
                        else
                            error(value+" is not a file");
                    } else {
                        if(ws.child(value).isDirectory())
                            ok();
                        else
                            error(value+" is not a directory");
                    }
                } else {
View Full Code Here

                    String dir = file.toURI().toString().replaceAll(baseWorkSpace, "").replaceAll(file.getName(), "");
                    FilePath targetChildDir = targetPath.child(dir);
                    if (!targetChildDir.exists()) {
                        targetChildDir.mkdirs();
                    }
                    file.copyTo(targetChildDir.child(file.getName()));
                }
            }
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
View Full Code Here

            Lease baseLease = getParentWorkspaceLease(n, wsl);
            FilePath baseDir = baseLease.path;
            EnvVars env = getEnvironment(listener);
            env.putAll(getBuildVariables());
            String childWs = getParent().getName();
            return Lease.createLinkedDummyLease(baseDir.child(env.expand(childWs)), baseLease);
        }

        @Override
        protected Result doRun(BuildListener listener) throws Exception {
            SubBuildExecutionAction subBuildExecutionAction = getAction(SubBuildExecutionAction.class);
View Full Code Here

        if (dev == null) {
            throw new AbortException("No such device: "+device);
        }

        FilePath ws = build.getWorkspace();
        FilePath[] files = ws.child(path).exists() ? new FilePath[]{ws.child(path)} : ws.list(path);
        if (files.length == 0) {
            listener.getLogger().println("No iOS apps found to deploy!");
            return false;
        }
View Full Code Here

        if (dev == null) {
            throw new AbortException("No such device: "+device);
        }

        FilePath ws = build.getWorkspace();
        FilePath[] files = ws.child(path).exists() ? new FilePath[]{ws.child(path)} : ws.list(path);
        if (files.length == 0) {
            listener.getLogger().println("No iOS apps found to deploy!");
            return false;
        }
View Full Code Here

        boolean hasChanges = false;
        for (Map.Entry<String, List<RemoteConfig>> entry : repoMap.entrySet()) {
            FilePath workingDirectory = workingDirectory(workspace);

            if (StringUtils.isNotEmpty(entry.getKey()) && !entry.getKey().equals(".")) {
                workingDirectory = workingDirectory.child(entry.getKey());
            }

            if (!workingDirectory.exists()) {
                workingDirectory.mkdirs();
            }
View Full Code Here

                List<Revision> canditates = new ArrayList<Revision>();
                for (Map.Entry<String, List<RemoteConfig>> entry : repoMap.entrySet()) {
                    FilePath workspace = new FilePath(localWorkspace);
                    if (StringUtils.isNotEmpty(entry.getKey()) && !entry.getKey().equals(".")) {
                        workspace = workspace.child(entry.getKey());
                    }
                    IGitAPI git = new GitAPI(gitExe, workspace, listener, environment);
                    if (git.hasGitRepo()) {
                        // Repo is there - do a fetch
                        listener.getLogger().println("Fetching changes from the remote Git repositories");
View Full Code Here

      }
    }
    else if (locaRepository instanceof PerJobLocalRepositoryLocator) {
      FilePath workspace = build.getWorkspace();
      if (workspace != null) {
        args.add("-Dmaven.repo.local=" + workspace.child(".repository"));
      }
    }
  }

  @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.