示例#1
0
        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);
        }
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }