Package hudson

Examples of hudson.FilePath$TunneledInterruptedException


    public void archive(MavenBuildProxy build, File file, BuildListener listener) throws IOException, InterruptedException {
        if (build.isArchivingDisabled()) {
            listener.getLogger().println("[JENKINS] Archiving disabled - not archiving " + file);
        }
        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");
            }

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


            }

            target = target.child(getArchiveTargetPath());

            try {
                new FilePath(destDir).copyRecursiveTo("**/*", target);
            } catch (IOException e) {
                Util.displayIOException(e,listener);
                e.printStackTrace(listener.fatalError(Messages.MavenJavadocArchiver_FailedToCopy(destDir,target)));
                build.setResult(Result.FAILURE);
            }
View Full Code Here

     * Check the location of the POM, alternate settings file, etc - any file.
     */
    public FormValidation doCheckFileInWorkspace(@QueryParameter String value) throws IOException, ServletException {
        MavenModuleSetBuild lb = getLastBuild();
        if (lb!=null) {
            FilePath ws = lb.getModuleRoot();
            if(ws!=null)
                return ws.validateRelativePath(value,true,true);
        }
        return FormValidation.ok();
    }
View Full Code Here

            return FormValidation.error(Messages.MavenModuleSet_AlternateSettingsRelativePath());
        }
       
        MavenModuleSetBuild lb = getLastBuild();
        if (lb!=null) {
            FilePath ws = lb.getWorkspace();
            if(ws!=null)
                return ws.validateRelativePath(value,true,true);
        }
        return FormValidation.ok();
    }
View Full Code Here

     * @throws InterruptedException
     */
    //@Test
    public void testDeploy() throws IOException, InterruptedException {
       
        adapter.redeploy(new FilePath(new File("src/test/simple.war")), "contextPath", null, null, new StreamBuildListener(System.out));
    }
View Full Code Here

   
    //@Test
    public void testRemoteDeploy() throws IOException, InterruptedException {
      

        remoteAdapter.redeploy(new FilePath(new File("src/test/simple.war")), "contextPath", null, null, new StreamBuildListener(System.out));
    }
View Full Code Here

     public void copyFiles(DynamicSubBuild run, DynamicBuild parent, String outputFiles, BuildListener listener) throws IOException {
        String baseWorkSpace;
        try {
            listener.getLogger().println("Copying files :" + outputFiles);
            FilePath workspacePath = run.getWorkspace();
            FilePath targetPath = parent.getWorkspace();
            if (workspacePath != null && targetPath != null) {
                baseWorkSpace = workspacePath.toURI().toString();
                for (FilePath file : workspacePath.list(outputFiles)) {
                    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

        }

        @Override
        protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws InterruptedException, IOException {
            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);
        }
View Full Code Here

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

        TaskListener listener = new StreamTaskListener(stdout,getClientCharset());
        for (String bundle : files) {
            FilePath p = new FilePath(checkChannel(), bundle);
            listener.getLogger().println("Deploying "+ bundle);
            dev.deploy(new File(p.getRemote()), listener);
        }
        return 0;
    }
View Full Code Here

        iOSDevice dev = devices.getDevice(device);
        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

TOP

Related Classes of hudson.FilePath$TunneledInterruptedException

Copyright © 2018 www.massapicom. 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.