예제 #1
0
 public BuildPipeline(DefinitionReference definitionRef)
 {
     Name    = definitionRef.Name;
     Path    = definitionRef.Path;
     Url     = definitionRef.Url;
     Id      = definitionRef.Id;
     Project = new TeamProject
     {
         TeamProjectName = definitionRef.Project.Name,
         Url             = definitionRef.Url
     };
 }
예제 #2
0
        public List <TestRun> GetAllTestRuns(TeamProject project)
        {
            var tmProject = m_service.GetTeamProject(project.TeamProjectName);
            var testRuns  = tmProject.TestRuns.Query("select * From TestRun").OrderByDescending(x => x.DateCompleted);

            var testRunList = new List <TestRun>();

            foreach (var run in testRuns)
            {
                TestRun testRun = ConvertToTestRun(run);
                testRunList.Add(testRun);
            }
            return(testRunList);
        }
예제 #3
0
        public List <TeamProject> GetAllProjects()
        {
            var service  = m_collection.GetService <ICommonStructureService>();
            var projects = service.ListAllProjects();

            var projectsList = new List <TeamProject>();

            foreach (var project in projects)
            {
                var teamProject = new TeamProject
                {
                    TeamProjectName = project.Name,
                    Url             = project.Uri
                };
                projectsList.Add(teamProject);
            }

            return(projectsList);
        }
예제 #4
0
        static void ShowProjectSelectionMenu()
        {
            Console.Clear();
            Console.WriteLine("CONNECTED({0}) > PROJECTS |)", Azure.Collection);

            var Projects = Azure.Projects.GetAllProjects();

            if (Projects.Count == 0)
            {
                Console.WriteLine("There are no projects.");
                Environment.Exit(1);
            }
            for (int i = 0; i < Projects.Count; i++)
            {
                TeamProject Project = Projects[i];
                Console.WriteLine("{0}. {1}", i + 1, Project.TeamProjectName);
            }
            Console.Write("Select Project: ");
            int choice = Convert.ToInt32(Console.ReadLine());

            SelectedProject = Projects[choice - 1];
        }
예제 #5
0
 public List <BuildInfo> GetAllBuilds(TeamProject project, List <int> BuildPipelineIds = null)
 {
     return(GetAllBuilds(project.TeamProjectName, BuildPipelineIds));
 }
예제 #6
0
 public List <BuildPipeline> GetBuildPipelines(TeamProject project)
 {
     return(GetBuildPipelines(project.TeamProjectName));
 }