I have written a script, see below, but the scp command doesn't work because our server is Windows. Is there another way using a 'QuickBuild only' method to do this?
groovy:
// Find artifacts directory
fromURL = grid.getServerNode().getHostName() + ":" + system.getConfiguration("root/Products/MyProduct").getLatestSuccessfulBuild().getArtifactsDir();
logger.info("Location of latest succesful build of UI: " + fromURL);
toDir = build.configuration.getWorkspaceDir() + "/build/win_release";
logger.info("Local output directory: " + toDir);
// Copy the zip file
command = "scp " + fromURL + "/windows/Product.zip " + toDir + "\windows";
proc = command.execute();
proc.waitFor();
result = proc.exitValue();
if (result != 0) {
throw new com.pmease.quickbuild.QuickbuildException("Failed to copy artifacts: " + proc.err.text);
logger.error("Failed to copy artifacts: " + proc.err.text);
} else {
logger.info("Copied artifacts to " + toDir);
}