示例#1
0
        static void Main(string[] args)
        {
            // TFSHelper.RefreshTFSBuildsConfig();
            ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
            if (args.Length == 0)
            {
                TFSHelper.LoadTFSBuildFromFile(TFSBUILDFILE, out tfsBuilds);
                TFSMonitorWorker tfsMonitor = new TFSMonitorWorker(tfsBuilds);
                tfsMonitor.Start();
                TestWorker testWorker = new TestWorker(tfsBuilds);
                testWorker.Start();
            }
            else
            {
                string dropFolder = args[0];
                string tag;
                Console.WriteLine("Test triggered for {0}", dropFolder);
                Console.WriteLine("Start Time: {0}", DateTimeOffset.Now);
                if (!TestHelper.BuildDockerImage(dropFolder, out tag))
                {
                    return;
                }
                Console.WriteLine("Image tag is {0}", tag);

                AzureFileHelper.UploadPaasDBUpgradeFileToAzureFile(tag, dropFolder + "\\retail\\amd64\\");

                var taskIds = TestHelper.StartTests(tag);

                taskIds.ForEach(i => Console.WriteLine("Start Testing: {0}", i));

                var stop = false;
                while (!stop)
                {
                    stop = true;
                    foreach (Guid taskId in taskIds)
                    {
                        bool result;
                        if (result = TestHelper.CheckFinished(taskId))
                        {
                            Console.WriteLine("Test task {0} completed", taskId);
                        }
                        stop = stop && result;
                    }
                    Thread.Sleep(TEST_MONITOR_INTERVAL);
                }
                Console.WriteLine("Completed!!!");
            }
        }
示例#2
0
 private static string GetCurrentDBProvisionScript()
 {
     // Sample: "ProvisionToV6_0.sql"
     return(string.Format("ProvisionToV{0}.sql", AzureFileHelper.GetProductDBVersion()));
 }
示例#3
0
 private static string GetCurrentProductImageTag()
 {
     // Sample: 14.0.900.5478.3272278
     return(AzureFileHelper.GetProductBackendWorkerVersion());
 }