private object GetBuildLog(dynamic parameters) { Deployment deployment = GetDeployment(parameters); string filename = parameters.filename; var fullPath = System.IO.Path.Combine(deployment.GetDeployLogFolder(), filename); return(new FileResponse(fullPath)); }
private static FileStream BuildDefaultLogStream(string name, Deployment deployment) { var deployLogFolder = deployment.GetDeployLogFolder(); Folder.EnsureExists(deployLogFolder); var filename = $"{name}.{Clock.UtcNow.ToLocalTime():yyyy-MM-dd_HH.mm.ss}.log"; var fullPath = Path.Combine(deployLogFolder, filename); var defaultStream = File.Open(fullPath, FileMode.Create, FileAccess.Write); return(defaultStream); }
private object GetBuildLogs(dynamic parameters) { Deployment deployment = GetDeployment(parameters); var logFolder = deployment.GetDeployLogFolder(); var files = Folder .EnumerateFiles(logFolder) .SortDescending(x => x.LastWriteTime); return(new BuildLogsModel(deployment.Id, files)); }