Package hudson

Examples of hudson.FilePath.copyTo()


                    String settingsPath = mavenHome + "/conf/settings.xml";
                    remoteSettings = build.getWorkspace().child( settingsPath);
                }
                listener.getLogger().println( "Maven RedeployPublished use remote " + (buildNode != null ? buildNode.getNodeName() : "local"
                                              + " maven settings from : " + remoteSettings.getRemote() );
                remoteSettings.copyTo( filePath );
                settingsLoc = tmpSettings;
               
            }

            MavenEmbedderRequest mavenEmbedderRequest = new MavenEmbedderRequest(listener,
View Full Code Here


              if (!StringUtils.isEmpty(file.getName())) {
                  listener.getLogger().println("Copying file to "+location);
                    FilePath locationFilePath = build.getWorkspace().child(location);
                    locationFilePath.getParent().mkdirs();
                  locationFilePath.copyFrom(file);
                    locationFilePath.copyTo(new FilePath(getLocationUnderBuild(build)));
              }
                return new Environment() {};
            }
        };
    }
View Full Code Here

    @Override
    public ParameterValue createValue(CLICommand command, String value) throws IOException, InterruptedException {
        // capture the file to the server
        FilePath src = new FilePath(command.checkChannel(),value);
        File local = File.createTempFile("jenkins","parameter");
        src.copyTo(new FilePath(local));

        FileParameterValue p = new FileParameterValue(getName(), local, src.getName());
        p.setDescription(getDescription());
        p.setLocation(getName());
        return p;
View Full Code Here

            owner.checkPermission(Jenkins.ADMINISTER);
            rsp.setContentType("application/octet-stream");

            FilePath dump = obtain();
            try {
                dump.copyTo(rsp.getCompressedOutputStream(req));
            } finally {
                dump.delete();
            }
        }
View Full Code Here

                FilePath f = new FilePath(channel, source);
                if (f.exists()) {
                    stdout.println(Messages.InstallPluginCommand_InstallingPluginFromLocalFile(f));
                    if (name==null)
                        name = f.getBaseName();
                    f.copyTo(getTargetFilePath());
                    if (dynamicLoad)
                        pm.dynamicLoad(getTargetFile());
                    continue;
                }
            }
View Full Code Here

        else {
            FilePath target = getArtifactArchivePath(build,groupId,artifactId,version);
            FilePath origin = new FilePath(file);
            if (!target.exists()) {
                listener.getLogger().println("[JENKINS] Archiving "+ file+" to "+target);
                origin.copyTo(target);
            } else if (!origin.digest().equals(target.digest())) {
                listener.getLogger().println("[JENKINS] Re-archiving "+file);
                origin.copyTo(target);
            } else {
                LOGGER.fine("Not actually archiving "+origin+" due to digest match");
View Full Code Here

            if (!target.exists()) {
                listener.getLogger().println("[JENKINS] Archiving "+ file+" to "+target);
                origin.copyTo(target);
            } else if (!origin.digest().equals(target.digest())) {
                listener.getLogger().println("[JENKINS] Re-archiving "+file);
                origin.copyTo(target);
            } else {
                LOGGER.fine("Not actually archiving "+origin+" due to digest match");
            }

            /* debug probe to investigate "missing artifact" problem typically seen like this:
View Full Code Here

          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

            FilePath f = new FilePath(channel, source);
            if (f.exists()) {
                stdout.println(Messages.InstallPluginCommand_InstallingPluginFromLocalFile(f));
                if (name==null)
                    name = f.getBaseName();
                f.copyTo(getTargetFile());
                continue;
            }

            // is this an URL?
            try {
View Full Code Here

            owner.checkPermission(Hudson.ADMINISTER);
            rsp.setContentType("application/octet-stream");

            FilePath dump = obtain();
            try {
                dump.copyTo(rsp.getCompressedOutputStream(req));
            } finally {
                dump.delete();
            }
        }
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.