private static void ValidateProcessFileCanBeDeserialized(ZipArchiveEntry processFileEntry) { using var processFileEntryStream = processFileEntry.Open(); using var processFileEntryStreamReader = new StreamReader(processFileEntryStream); try { DeploymentProcessFile.OpenFomStream(processFileEntryStreamReader); } catch (Exception exception) { throw new ZipArchiveDeserializingFailedException(exception); } }
public ProcessOutput Run(string workingDir, DeploymentProcessFile deploymentProcessFile, VariableForEnvironment[] variablesForEnvironment) { var _commandsRunner = new BashCommandsRunner( workingDir, _deploymentProcessSettings.Shell.Bash.ToString() ); var commandsOutput = _commandsRunner.Run(deploymentProcessFile.Commands, variablesForEnvironment); return(new ProcessOutput { Steps = new [] { new ProcessStepResult { Command = "all commands", Output = commandsOutput.Output.ToArray(), Successful = commandsOutput.Successful } } }); }