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