Refine search
/** * @author Kohsuke Kawaguchi */ @Extension public class GetJobCommand extends CLICommand { @Argument(metaVar="JOB",usage="Name of the job",required=true) public AbstractItem job; @Override public String getShortDescription() { return Messages.GetJobCommand_ShortDescription(); } protected int run() throws Exception { job.writeConfigDotXml(stdout); return 0; } }
@Extension public class SetBuildDescriptionCommand extends CLICommand implements Serializable { @Argument(metaVar="JOB",usage="Name of the job to build",required=true,index=0) public transient Job<?,?> job; @Argument(metaVar="BUILD#",usage="Number of the build",required=true,index=1) public int number; @Argument(metaVar="DESCRIPTION",required=true,usage="Description to be set. '=' to read from stdin.", index=2) public String description;
/** * @author Kohsuke Kawaguchi */ @Extension public class UpdateJobCommand extends CLICommand { @Argument(metaVar="JOB",usage="Name of the job",required=true) public AbstractItem job; @Override public String getShortDescription() { return Messages.UpdateJobCommand_ShortDescription(); } protected int run() throws Exception { job.updateByXml((Source)new StreamSource(stdin)); return 0; } }
@Extension public class SetBuildDisplayNameCommand extends CLICommand implements Serializable { private static final long serialVersionUID = 6665171784136358536L; @Argument(metaVar="JOB", usage="Name of the job to build", required=true, index=0) public transient Job<?, ?> job; @Argument(metaVar="BUILD#", usage="Number of the build", required=true, index=1) public int number; @Argument(metaVar="DISPLAYNAME", required=true, usage="DisplayName to be set. '-' to read from stdin.", index=2) public String displayName;
/** * @author ogondza * @since 1.526 */ @Extension public class UpdateNodeCommand extends CLICommand { @Argument(metaVar="NODE", usage="Name of the node", required=true) public Node node; @Override public String getShortDescription() { return Messages.UpdateNodeCommand_ShortDescription(); } @Override protected int run() throws IOException, ServletException { node.toComputer().updateByXml(stdin); return 0; } }
/** * @author ogondza * @since 1.538 */ @Extension public class UpdateViewCommand extends CLICommand { @Argument(usage="Name of the view to update", required=true) private View view; @Override public String getShortDescription() { return Messages.UpdateViewCommand_ShortDescription(); } @Override protected int run() throws Exception { view.updateByXml(new StreamSource(stdin)); return 0; } }
/** * @author ogondza * @since 1.538 */ @Extension public class GetViewCommand extends CLICommand { @Argument(usage="Name of the view to obtain", required=true) private View view; @Override public String getShortDescription() { return Messages.GetViewCommand_ShortDescription(); } @Override protected int run() throws Exception { view.checkPermission(View.READ); view.writeXml(stdout); return 0; } }
/** * CLI command, which waits till the node switches to the offline state. * @author pjanouse * @since 2.16 */ @Extension public class WaitNodeOfflineCommand extends CLICommand { @Argument(metaVar="NODE", usage="Name of the node", required=true) public Node node; @Override public String getShortDescription() { return Messages.WaitNodeOfflineCommand_ShortDescription(); } @Override protected int run() throws Exception { node.toComputer().waitUntilOffline(); return 0; } }
/** * CLI command, which waits till the node switches to the online state. * @author pjanouse * @since 2.16 */ @Extension public class WaitNodeOnlineCommand extends CLICommand { @Argument(metaVar="NODE", usage="Name of the node", required=true) public Node node; @Override public String getShortDescription() { return Messages.WaitNodeOnlineCommand_ShortDescription(); } @Override protected int run() throws Exception { node.toComputer().waitUntilOnline(); return 0; } }
/** * @author ogondza * @since 1.526 */ @Extension public class GetNodeCommand extends CLICommand { @Argument(metaVar="NODE", usage="Name of the node", required=true) public Node node; @Override public String getShortDescription() { return Messages.GetNodeCommand_ShortDescription(); } @Override protected int run() throws IOException { node.checkPermission(Computer.EXTENDED_READ); Jenkins.XSTREAM2.toXMLUTF8(node, stdout); return 0; } }
/** * Sets the result of the current build. Works only if invoked from within a build. * * @author Kohsuke Kawaguchi * @deprecated Limited to Remoting-based protocol. */ @Deprecated @Extension public class SetBuildResultCommand extends CommandDuringBuild { @Argument(metaVar="RESULT",required=true) public Result result; @Override public String getShortDescription() { return Messages.SetBuildResultCommand_ShortDescription(); } @Override protected int run() throws Exception { Run r = getCurrentlyBuilding(); r.checkPermission(Run.UPDATE); r.setResult(result); return 0; } }
@Extension public class GroovyCommand extends CLICommand { @Override @Argument(metaVar="SCRIPT",usage="Script to be executed. File, URL or '=' to represent stdin.") public String script; @Argument(metaVar="ARGUMENTS", index=1, usage="Command line arguments to pass into script.") public List<String> remaining = new ArrayList<>();