Examples of toComputer()


Examples of hudson.model.Node.toComputer()

        if ((mavenOpts==null) || (mavenOpts.trim().length()==0)) {
            Node n = getCurrentNode();
            if (n!=null) {
                try {
                    String localMavenOpts = n.toComputer().getEnvironment().get("MAVEN_OPTS");
                   
                    if ((localMavenOpts!=null) && (localMavenOpts.trim().length()>0)) {
                        mavenOpts = localMavenOpts;
                    }
                } catch (IOException e) {
View Full Code Here

Examples of hudson.model.Node.toComputer()

        if (b != null) {
            Node lastBuiltOn = b.getBuiltOn();

            if (lastBuiltOn != null) {
                env = lastBuiltOn.toComputer().getEnvironment().overrideAll(b.getCharacteristicEnvVars());
            } else {
                env = new EnvVars(System.getenv());
            }

            String rootUrl = Hudson.getInstance().getRootUrl();
View Full Code Here

Examples of hudson.model.Node.toComputer()

            if(node==null){
                //probably does not exists yet
                continue;
            }
           
            if(node.toComputer()!=null && node.toComputer().getChannel()!=null){
                Iterator<String> iterator = property.getSlaveWorkspaceUsage().get(nodeName).keySet().iterator();
                while(iterator.hasNext()){
                    String projectWorkspace = iterator.next();
                    FilePath workspace = new FilePath(node.toComputer().getChannel(), projectWorkspace);
                    if(workspace.exists()){
View Full Code Here

Examples of hudson.model.Node.toComputer()

            if(node==null){
                //probably does not exists yet
                continue;
            }
           
            if(node.toComputer()!=null && node.toComputer().getChannel()!=null){
                Iterator<String> iterator = property.getSlaveWorkspaceUsage().get(nodeName).keySet().iterator();
                while(iterator.hasNext()){
                    String projectWorkspace = iterator.next();
                    FilePath workspace = new FilePath(node.toComputer().getChannel(), projectWorkspace);
                    if(workspace.exists()){
View Full Code Here

Examples of hudson.model.Node.toComputer()

           
            if(node.toComputer()!=null && node.toComputer().getChannel()!=null){
                Iterator<String> iterator = property.getSlaveWorkspaceUsage().get(nodeName).keySet().iterator();
                while(iterator.hasNext()){
                    String projectWorkspace = iterator.next();
                    FilePath workspace = new FilePath(node.toComputer().getChannel(), projectWorkspace);
                    if(workspace.exists()){
                        Long diskUsage = property.getSlaveWorkspaceUsage().get(node.getNodeName()).get(workspace.getRemote());
                        ArrayList<FilePath> exceededFiles = new ArrayList<FilePath>();
                        if(project instanceof ItemGroup){
                            List<AbstractProject> projects = getAllProjects((ItemGroup) project);
View Full Code Here

Examples of hudson.model.Slave.toComputer()

        ArgumentListBuilder args = new ArgumentListBuilder();
        args.add("java");
        args.addMasked("-version");

        Slave s = createSlave();
        s.toComputer().connect(false).get();
       
        StringWriter out = new StringWriter();
        assertEquals(0,s.createLauncher(new StreamTaskListener(out)).launch().cmds(args).join());
        System.out.println(out);
        assertTrue(out.toString().contains("$ java ********"));
 
View Full Code Here

Examples of hudson.slaves.DumbSlave.toComputer()

        ch.close();
    }

    private VirtualChannel createSlaveChannel() throws Exception {
        DumbSlave s = createSlave();
        s.toComputer().connect(false).get();
        VirtualChannel ch=null;
        while (ch==null) {
            ch = s.toComputer().getChannel();
            Thread.sleep(100);
        }
View Full Code Here

Examples of hudson.slaves.DumbSlave.toComputer()

    private VirtualChannel createSlaveChannel() throws Exception {
        DumbSlave s = createSlave();
        s.toComputer().connect(false).get();
        VirtualChannel ch=null;
        while (ch==null) {
            ch = s.toComputer().getChannel();
            Thread.sleep(100);
        }
        return ch;
    }
View Full Code Here

Examples of hudson.slaves.DumbSlave.toComputer()

        CLI cli = new CLI(getURL());
        try {
            assertTrue(cli.execute("wait-node-offline","xxx")!=0);
            assertTrue(cli.execute("wait-node-online",s.getNodeName())==0);

            s.toComputer().disconnect().get();

            assertTrue(cli.execute("wait-node-offline",s.getNodeName())==0);
        } finally {
            cli.close();
        }
View Full Code Here

Examples of hudson.slaves.DumbSlave.toComputer()

    protected static Slave createSlave(String name, String remoteFS, Jenkins jenkins, ComputerLauncher launcher) throws Exception{
        DumbSlave slave = new DumbSlave(name, "dummy",
            remoteFS, "2", Mode.NORMAL, "", launcher,
            RetentionStrategy.NOOP, Collections.<NodeProperty<?>>emptyList());
      jenkins.addNode(slave);
        while(slave.toComputer()==null || !slave.toComputer().isOnline()){
            Thread.sleep(100);
        }
        return slave;
    }
   
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.