public void Deploy(Guid deploymentId, Guid uniqueClientId, string requesterIdentity, DeploymentInfo deploymentInfoDto) { try { Guard.NotEmpty(deploymentId, "deploymentId"); Guard.NotEmpty(uniqueClientId, "uniqueClientId"); Guard.NotNullNorEmpty(requesterIdentity, "requesterIdentity"); Guard.NotNull(deploymentInfoDto, "DeploymentInfo"); ProjectInfo projectInfo = _projectInfoRepository.FindByName(deploymentInfoDto.ProjectName); if (projectInfo == null) { throw new FaultException <ProjectNotFoundFault>(new ProjectNotFoundFault { ProjectName = deploymentInfoDto.ProjectName }); } Core.Domain.DeploymentInfo deploymentInfo = DtoMapper.ConvertDeploymentInfo(deploymentInfoDto, projectInfo); DoDeploy(uniqueClientId, requesterIdentity, deploymentInfo, projectInfo); } catch (Exception exc) { HandleDeploymentException(exc, uniqueClientId); } }
private void DoCreatePackage(Guid uniqueClientId, string requesterIdentity, DeploymentInfo deploymentInfoDto, ProjectInfo projectInfo, string packageDirPath) { var deploymentTask = new CreateManualDeploymentPackageDeploymentTask( ObjectFactory.Instance.CreateProjectInfoRepository(), ObjectFactory.Instance.CreateEnvironmentInfoRepository(), ObjectFactory.Instance.CreateArtifactsRepository(), ObjectFactory.Instance.CreateDirectoryAdapter(), ObjectFactory.Instance.CreateFileAdapter(), ObjectFactory.Instance.CreateZipFileAdapter(), packageDirPath); Core.Domain.DeploymentInfo deploymentInfo = DtoMapper.ConvertDeploymentInfo(deploymentInfoDto, projectInfo); StartTask(deploymentTask, uniqueClientId, requesterIdentity, deploymentInfo); }