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); }
public void SetSelectedDbScriptsToRun(Guid deploymentId, Proxy.Dto.DbScriptsToRunSelection scriptsToRunSelection) { ScriptsToRunSelector.SetSelectedScriptsToRun( deploymentId, DtoMapper.Map <Proxy.Dto.DbScriptsToRunSelection, DbScriptsToRunSelection>(scriptsToRunSelection)); }
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); }