Exemplo n.º 1
0
        public Result Run(IMessagePresenter presenter, IChefBootstrapper chefBootstrapper)
        {
            presenter.ShowMessage($"Running chef {chefBootstrapper}");
            chefBootstrapper.PrepareEnvironmentForChefRun();
            var process = _processCreator();

            process.LogEntryReceived += (sender, entry) =>
            {
                presenter.ShowMessage(entry.Entry);
                entry.Log();
            };
            var argumentsForChefRun = chefBootstrapper.ArgumentsForChefRun();
            var result = process.Run(argumentsForChefRun);

            presenter.ShowMessage($"Finished running chef with result: {result}");
            return(result);
        }
Exemplo n.º 2
0
 public Result Run(IMessagePresenter presenter, IChefBootstrapper chefBootstrapper)
 {
     WasRun       = true;
     Bootstrapper = chefBootstrapper;
     return(Result.Successful());
 }
Exemplo n.º 3
0
 public JobRunStatus Bootstrap(IChefBootstrapper bootstrapper)
 {
     return(OnRunReady(new JobRun($"Bootstrapping Chef with {bootstrapper}", messagePresenter => _chefRunner.Run(messagePresenter, bootstrapper), _clock)));
 }