public DeployStatusInfoClient(DeployStatusConfiguration configuration) { octopusClient = new OctopusClient(configuration.Octopus); trelloClient = new TrelloClient(configuration.Trello); teamCityClient = new TeamCityClient(configuration.TeamCity); DeployUserResolver = configuration.DeployUserResolver; log = LogManager.GetLogger(typeof(DeployStatusInfoClient)); }
public DeployStatusInfoClient(DeployStatusConfiguration configuration) { octopusClient = new OctopusClient(configuration.Octopus); trelloClient = new TrelloClient(configuration.Trello); teamCityClient = new TeamCityClient(configuration.TeamCity); DeployUserResolver = configuration.DeployUserResolver; log = LogManager.GetLogger(typeof (DeployStatusInfoClient)); }
public DeployStatusConfiguration(string name, string webAppUrl, bool performEmailNotificationsCheckOnStartup, TrelloApiConfiguration trello, OctopusApiConfiguration octopus, TeamCityApiConfiguration teamCity, IDeployUserResolver deployUserResolver = null) { Name = name; WebAppUrl = webAppUrl; PerformEmailNotificationsCheckOnStartup = performEmailNotificationsCheckOnStartup; Trello = trello; Octopus = octopus; TeamCity = teamCity; DeployUserResolver = deployUserResolver ?? new SimpleDeployUserResolver(); }
private static IList<Environment> GetEnvironments(IEnumerable<DeployStatusInfo> status, IDeployUserResolver deployUserResolver) { return status.Select( x => new Environment( x.Environment.Id, x.Environment.Name, x.Environment.ReleaseVersion, x.Environment.StartTime.GetValueOrDefault(), x.Environment.State, x.BranchName, x.Environment.AbsoluteDeployLink, GetNormalizedName(deployUserResolver.GetDeployer(x)), x.Environment.Machines.Any(y => y.IsDisabled), x.BranchRelatedTrellos.Select(GetTrelloCard).ToList(), x.EnvironmentTaggedTrellos.Select(GetTrelloCard).ToList(), x.BuildInfo.Select(GetBuildInfo))).ToList(); }
private static IList <Environment> GetEnvironments(IEnumerable <DeployStatusInfo> status, IDeployUserResolver deployUserResolver) { return (status.Select( x => new Environment( x.Environment.Id, x.Environment.Name, x.Environment.ReleaseVersion, x.Environment.StartTime.GetValueOrDefault(), x.Environment.State, x.BranchName, x.Environment.AbsoluteDeployLink, GetNormalizedName(deployUserResolver.GetDeployer(x)), x.Environment.Machines.Any(y => y.IsDisabled), x.BranchRelatedTrellos.Select(GetTrelloCard).ToList(), x.EnvironmentTaggedTrellos.Select(GetTrelloCard).ToList(), x.BuildInfo.Select(GetBuildInfo))).ToList()); }