Esempio n. 1
0
        private static void PopulateAllJobInfos(DataClient dataClient)
        {
            var client = new JenkinsClient();
            foreach (var name in client.GetJobNames())
            {
                if (!name.Contains("roslyn"))
                {
                    continue;
                }

                List<JobId> jobs;
                try
                {
                    jobs = client.GetJobIds(name);
                }
                catch
                {
                    Console.WriteLine($"Can't get jobs for {name}");
                    continue;
                }

                foreach (var id in jobs)
                {
                    try
                    {
                        Console.Write($"Processing {id.Id} {id.Name} ... ");
                        var info = client.GetJobInfo(id);
                        dataClient.InsertJobInfo(info);
                        Console.WriteLine("Done");
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine("ERROR!!!");
                        Console.WriteLine(ex.Message);
                    }
                }
            }
        }
Esempio n. 2
0
 private static void PrintJobNames()
 {
     var client = new JenkinsClient();
     foreach (var name in client.GetJobNames())
     {
         Console.WriteLine(name);
     }
 }
Esempio n. 3
0
 public RoslynClient()
 {
     _client = new JenkinsClient();
 }