예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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));
        }