Пример #1
0
        /// <summary>
        /// Download zip archive with logs
        /// </summary>
        /// <param name="teamProjectName"></param>
        /// <param name="releaseId"></param>
        private static void DownloadReleaseLogs(string teamProjectName, int releaseId)
        {
            Stream logReader = ReleaseClient.GetLogsAsync(teamProjectName, releaseId).Result;

            using (var fileStream = new FileStream("C:\\Temp\\rel_" + releaseId + "_logs.zip", FileMode.Create))
            {
                logReader.CopyTo(fileStream);
            }
        }
Пример #2
0
        public System.IO.Stream GetLogsOfRelease()
        {
            string projectName = ClientSampleHelpers.FindAnyProject(this.Context).Name;

            // Get a release client instance
            VssConnection     connection    = Context.Connection;
            ReleaseHttpClient releaseClient = connection.GetClient <ReleaseHttpClient>();

            System.IO.Stream taskLogs = releaseClient.GetLogsAsync(project: projectName, releaseId: completedReleaseId).Result;
            Context.Log("{0} {1}", completedReleaseId.ToString().PadLeft(6), completedReleaseId);

            return(taskLogs);
        }