Пример #1
0
        private ProjectConfigurationBuild GetLatestSuccessfulBuild(string projectName, string projectConfigurationName)
        {
            Guard.NotNullNorEmpty(projectName, "projectName");
            Guard.NotNullNorEmpty(projectConfigurationName, "projectConfigurationName");

            ProjectInfo projectInfo = _projectInfoRepository.FindByName(projectName);

            TeamCityBuildType teamCityBuildType = _teamCityClient.GetBuildTypes(projectInfo.ArtifactsRepositoryName).FirstOrDefault(x => x.Name == projectConfigurationName);

            if (teamCityBuildType == null)
            {
                return(null);
            }

            TeamCityBuild lastSuccessfulBuild = _teamCityClient.GetLastSuccessfulBuild(teamCityBuildType.Id);

            ProjectConfigurationBuild projectConfigurationOfLastBuild = DtoMapper.Map <TeamCityBuild, ProjectConfigurationBuild>(lastSuccessfulBuild);

            return(projectConfigurationOfLastBuild);
        }
Пример #2
0
 public void SetSelectedDbScriptsToRun(Guid deploymentId, Proxy.Dto.DbScriptsToRunSelection scriptsToRunSelection)
 {
     ScriptsToRunSelector.SetSelectedScriptsToRun(
         deploymentId,
         DtoMapper.Map <Proxy.Dto.DbScriptsToRunSelection, DbScriptsToRunSelection>(scriptsToRunSelection));
 }
Пример #3
0
        public void SetSelectedDependentProjectsToDeploy(Guid deploymentId, List <DependentProject> dependenciesToDeploy)
        {
            DependentProjectsToDeploySelection dependentProjectsToDeploySelection = new DependentProjectsToDeploySelection()
            {
                SelectedProjects = new List <Core.ExternalDataCollectors.DependentProjectsSelection.DependentProject>(DtoMapper.Map <List <Proxy.Dto.DependentProject>, List <Core.ExternalDataCollectors.DependentProjectsSelection.DependentProject> >(dependenciesToDeploy))
            };

            DependentProjectsToDeployWebSelector
            .SetSelectedProjectsToDeploy(deploymentId, dependentProjectsToDeploySelection);
        }