Example #1
0
        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);
            };
        }
Example #2
0
        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);
            };
        }
Example #3
0
        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);
            };
        }