Package com.dtolabs.rundeck.core.execution.service

Examples of com.dtolabs.rundeck.core.execution.service.NodeExecutorResult


        {
            final NodeStepResult interpreterResult = interpret.executeNodeStep(context, command, test1);
            //returning null from command
            assertTrue(interpreterResult.isSuccess());
            assertTrue(interpreterResult instanceof NodeExecutorResult);
            NodeExecutorResult result = (NodeExecutorResult) interpreterResult;
            assertEquals(0, result.getResultCode());
            assertEquals(test1, result.getNode());

//            assertEquals(context, testexec.testContext);
            assertTrue(Arrays.deepEquals(strings, testexec.testCommand));
            assertEquals(test1, testexec.testNode);
        }
View Full Code Here


        {
            final NodeStepResult interpreterResult = interpret.executeNodeStep(context, command, test1);
            //returning null from command
            assertTrue(interpreterResult.isSuccess());
            assertTrue(interpreterResult instanceof NodeExecutorResult);
            NodeExecutorResult result = (NodeExecutorResult) interpreterResult;
            assertEquals(0, result.getResultCode());
            assertEquals(test1, result.getNode());

//            assertEquals(context, testexec.testContext);
            assertTrue(Arrays.deepEquals(strings, testexec.testCommand));
            assertEquals(test1, testexec.testNode);
        }
View Full Code Here

         * TODO: Avoid this horrific hack. Discover how to get SCP task to preserve the execute bit.
         */
        if (!"windows".equalsIgnoreCase(node.getOsFamily())) {
            //perform chmod+x for the file

            final NodeExecutorResult nodeExecutorResult = framework.getExecutionService().executeCommand(
                    context, ExecArgList.fromStrings(false, "chmod", "+x", filepath), node);
            if (!nodeExecutorResult.isSuccess()) {
                return nodeExecutorResult;
            }
        }

        //build arg list to execute the script
        ExecArgList scriptArgList = ScriptExecUtil.createScriptArgList(
                filepath,
                null,
                args,
                scriptInterpreter,
                interpreterargsquoted
        );

        NodeExecutorResult nodeExecutorResult = framework.getExecutionService().executeCommand(context,
                scriptArgList, node);

        if (removeFile) {
            //remove file
            final NodeExecutorResult nodeExecutorResult2 = framework.getExecutionService().executeCommand(
                    context, removeArgsForOsFamily(filepath, node.getOsFamily()), node);
            if (!nodeExecutorResult2.isSuccess()) {
                if (null != context.getExecutionListener()) {
                    context.getExecutionListener().log(1, "Failed to remove remote file: " + filepath);
                }
            }
        }
View Full Code Here

         * TODO: Avoid this horrific hack. Discover how to get SCP task to preserve the execute bit.
         */
        if (!"windows".equalsIgnoreCase(node.getOsFamily())) {
            //perform chmod+x for the file

            final NodeExecutorResult nodeExecutorResult = framework.getExecutionService().executeCommand(
                context, new String[]{"chmod", "+x", filepath}, node);
            if (!nodeExecutorResult.isSuccess()) {
                return nodeExecutorResult;
            }
        }

        final String[] args = script.getArgs();
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.execution.service.NodeExecutorResult

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.