Example #1
0
        private static void CollectData()
        {
            var all = new List <string>();

            foreach (var file in Directory.EnumerateFiles(Root, "builds.csv", SearchOption.AllDirectories))
            {
                foreach (var buildData in ReadBuildData(file))
                {
                    var path    = JenkinsUtil.ConvertJobIdToPath(buildData.BuildId.JobId);
                    var isPr    = JobUtil.IsPullRequestJobName(buildData.BuildId.JobId);
                    var newLine = $"{path},{buildData.BuildId.Number},{isPr},{buildData.ResultName},{buildData.ResultCategory}";
                    all.Add(newLine);
                }
            }

            File.WriteAllLines(
                Path.Combine(Root, "all.csv"),
                all.ToArray());
        }
 private static void Test(string path, JobId id)
 {
     Assert.Equal(path, JenkinsUtil.ConvertJobIdToPath(id));
     Assert.Equal(id, JenkinsUtil.ConvertPathToJobId(path));
 }