Package hudson.slaves

Class CommandLauncher

    • Constructor Detail

      • CommandLauncher

        @DataBoundConstructor
        public CommandLauncher​(String command)
        Constructor for use from UI. Conditionally approves the script.
        Parameters:
        command - the command to run pending approval
        See Also:
        CommandLauncher(String command, EnvVars env)
      • CommandLauncher

        public CommandLauncher​(String command,
                               EnvVars env)
        Constructor for programmatic use. Always approves the script.
        Parameters:
        command - the single command to run; note: this can't be a shell statement (e.g. "echo foo > bar; baz" -- if you need to do that, either use "sh -c" or write the expression into a script and point to the script)
        env - environment variables for the launcher to include when it runs the command