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); }
public Result Run(IMessagePresenter presenter, IChefBootstrapper chefBootstrapper) { WasRun = true; Bootstrapper = chefBootstrapper; return(Result.Successful()); }
public JobRunStatus Bootstrap(IChefBootstrapper bootstrapper) { return(OnRunReady(new JobRun($"Bootstrapping Chef with {bootstrapper}", messagePresenter => _chefRunner.Run(messagePresenter, bootstrapper), _clock))); }