static void ConfigureStart(CommandLineApplication cmd) { var options = DeployOptions.GetOptions(cmd); cmd.Description = "Start a deployment in a pending state. Deployment must be completed or cancelled."; cmd.Invoke = () => { var processor = _container.GetRequiredService <DeploymentCommandProcessor>(); processor.StartAsync(options).Wait(); return(1); }; }
static void ConfigureCancel(CommandLineApplication cmd) { var options = DeployOptions.GetOptions(cmd); cmd.Description = "Cancel a pending deployment"; cmd.Invoke = () => { var processor = _container.GetRequiredService <DeploymentCommandProcessor>(); processor.CancelAsync(options).Wait(); return(1); }; }
static void ConfigureComplete(CommandLineApplication cmd) { var options = DeployOptions.GetOptions(cmd); cmd.Description = "Complete a pending deployment request or create a new, completed deployment"; cmd.Invoke = () => { var processor = _container.GetRequiredService <DeploymentCommandProcessor>(); processor.CompleteAsync(options).Wait(); return(1); }; }