Package hudson

Examples of hudson.FilePath.copyFrom()


    private Object convert(String name, ParameterValue v) throws IOException, InterruptedException {
        if (v instanceof FileParameterValue) {
            FileParameterValue fv = (FileParameterValue) v;
            FilePath fp = new FilePath(run.getRootDir()).child(name);
            fp.copyFrom(fv.getFile());
            return fp;
        } else {
            return v.getValue();
        }
    }
View Full Code Here


          throws IOException, InterruptedException {
        if (!Strings.isNullOrEmpty(getName())) {
          listener.getLogger().println("Copying file to " + getName());
          FilePath locationFilePath = build.getWorkspace().child(getName());
          locationFilePath.getParent().mkdirs();
          locationFilePath.copyFrom(file);
          file = null;
          locationFilePath.copyTo(new FilePath(getLocationUnderBuild(build)));
        }
        return new Environment(){};
      }
View Full Code Here

            Platform p = Platform.of(node);
            URL url = locate(log, p, CPU.of(node));

            out.println("Downloading "+url);
            FilePath file = expectedLocation.child(p.bundleFileName);
            file.copyFrom(url);

            // JDK6u13 on Windows doesn't like path representation like "/tmp/foo", so make it a strict platform native format by doing 'absolutize'
            install(node.createLauncher(log), p, new FilePathFileSystem(node), log, expectedLocation.absolutize().getRemote(), file.getRemote());

            // successfully installed
View Full Code Here

            public Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException {
              if (!StringUtils.isEmpty(file.getName())) {
                  listener.getLogger().println("Copying file to "+location);
                    FilePath locationFilePath = build.getWorkspace().child(location);
                    locationFilePath.getParent().mkdirs();
                  locationFilePath.copyFrom(file);
                  file = null;
                    locationFilePath.copyTo(new FilePath(getLocationUnderBuild(build)));
              }
                return new Environment() {};
            }
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.