public async Task Request() { var projectTask = RepositoryCommonQueries.GetProjectByName(ProjectName); tenants = await RepositoryCommonQueries.FindTenants(TenantNames, TenantTags).ConfigureAwait(false); project = await projectTask.ConfigureAwait(false); foreach (var environmentName in EnvironmentNames) { var environment = await RepositoryCommonQueries.GetEnvironmentByName(environmentName).ConfigureAwait(false); if (!tenants.Any()) { DeleteOverrideForEnvironment(project, environment); } else { foreach (var tenant in tenants) { DeleteOverrideForTenant(project, environment, tenant); } } } await Repository.Projects.Modify(project).ConfigureAwait(false); }
public async Task Request() { project = await RepositoryCommonQueries.GetProjectByName(ProjectName).ConfigureAwait(false); releaseTask = RepositoryCommonQueries.GetReleaseByVersion(ReleaseVersionNumber, project, null).ConfigureAwait(false); tenants = await RepositoryCommonQueries.FindTenants(TenantNames, TenantTags).ConfigureAwait(false); release = await releaseTask; foreach (var environmentName in EnvironmentNames) { environment = await RepositoryCommonQueries.GetEnvironmentByName(environmentName).ConfigureAwait(false); if (!tenants.Any()) { AddOverrideForEnvironment(project, environment, release); } else { foreach (var tenant in tenants) { AddOverrideForTenant(project, environment, tenant, release); } } } await Repository.Projects.Modify(project).ConfigureAwait(false); }
protected override void Execute() { var project = RepositoryCommonQueries.GetProjectByName(ProjectName); var channel = GetChannel(project); var releaseToPromote = RepositoryCommonQueries.GetReleaseByVersion(VersionNumber, project, channel); DeployRelease(project, releaseToPromote); }
protected override async Task Execute() { var project = await RepositoryCommonQueries.GetProjectByName(ProjectName).ConfigureAwait(false); var channel = await GetChannel(project).ConfigureAwait(false); var releaseToPromote = await RepositoryCommonQueries.GetReleaseByVersion(VersionNumber, project, channel).ConfigureAwait(false); await DeployRelease(project, releaseToPromote).ConfigureAwait(false); }
public async Task Request() { project = await RepositoryCommonQueries.GetProjectByName(ProjectName).ConfigureAwait(false); channel = await GetChannel(project).ConfigureAwait(false); releaseToPromote = await RepositoryCommonQueries.GetReleaseByVersion(VersionNumber, project, channel).ConfigureAwait(false); if (UpdateVariableSnapshot) { commandOutputProvider.Debug("Updating the release variable snapshot with variables from the project"); await Repository.Releases.SnapshotVariables(releaseToPromote); } await DeployRelease(project, releaseToPromote).ConfigureAwait(false); }
protected override async Task Execute() { var project = await RepositoryCommonQueries.GetProjectByName(ProjectName).ConfigureAwait(false); var channel = await GetChannel(project).ConfigureAwait(false); var releaseToPromote = await RepositoryCommonQueries.GetReleaseByVersion(VersionNumber, project, channel).ConfigureAwait(false); if (UpdateVariableSnapshot) { Log.Debug("Updating the release variable snapshot with variables from the project"); await Repository.Releases.SnapshotVariables(releaseToPromote); } await DeployRelease(project, releaseToPromote).ConfigureAwait(false); }
public async Task Request() { project = await Repository.Projects.FindByNameOrIdOrFail(ProjectNameOrId).ConfigureAwait(false); channel = !string.IsNullOrWhiteSpace(ChannelNameOrId) ? await Repository.Channels.FindByNameOrIdOrFail(project, ChannelNameOrId).ConfigureAwait(false) : null; releaseToPromote = await RepositoryCommonQueries.GetReleaseByVersion(VersionNumber, project, channel).ConfigureAwait(false); if (UpdateVariableSnapshot) { commandOutputProvider.Debug("Updating the release variable snapshot with variables from the project"); await Repository.Releases.SnapshotVariables(releaseToPromote).ConfigureAwait(false); } await DeployRelease(project, releaseToPromote).ConfigureAwait(false); }
protected override void Execute() { var project = RepositoryCommonQueries.GetProjectByName(ProjectName); var tenants = RepositoryCommonQueries.FindTenants(TenantNames, TenantTags); foreach (var environmentName in EnvironmentNames) { var environment = RepositoryCommonQueries.GetEnvironmentByName(environmentName); if (!tenants.Any()) { DeleteOverrideForEnvironment(project, environment); } else { foreach (var tenant in tenants) { DeleteOverrideForTenant(project, environment, tenant); } } } Repository.Projects.Modify(project); }
protected override void Execute() { var project = RepositoryCommonQueries.GetProjectByName(ProjectName); var release = RepositoryCommonQueries.GetReleaseByVersion(ReleaseVersionNumber, project, null); var tenants = RepositoryCommonQueries.FindTenants(TenantNames, TenantTags); foreach (var environmentName in EnvironmentNames) { var environment = RepositoryCommonQueries.GetEnvironmentByName(environmentName); if (!tenants.Any()) { AddOverrideForEnvironment(project, environment, release); } else { foreach (var tenant in tenants) { AddOverrideForTenant(project, environment, tenant, release); } } } Repository.Projects.Modify(project); }