Skip to content

Add global continuousDeployment setting#2173

Open
StefanMaron wants to merge 3 commits intomicrosoft:mainfrom
StefanMaron:feat/global-continuousdeployment-setting
Open

Add global continuousDeployment setting#2173
StefanMaron wants to merge 3 commits intomicrosoft:mainfrom
StefanMaron:feat/global-continuousdeployment-setting

Conversation

@StefanMaron
Copy link

@StefanMaron StefanMaron commented Mar 18, 2026

Closes #2172

Summary

Adds a top-level continuousDeployment setting that provides a global default for all environments, filling the gap between per-environment DeployTo<name>.ContinuousDeployment and having no way to set this globally.

Priority order (lowest → highest):

  1. Name convention ((PROD)/(FAT) → false, otherwise → true) — unchanged default
  2. Global continuousDeployment setting — new
  3. Per-environment DeployTo<name>.ContinuousDeployment — unchanged, still wins

Primary use case: Set "continuousDeployment": false in the org-level ALGoOrgSettings variable to disable automatic CD across all repositories and all environments with a single setting. Individual environments can opt back in via DeployTo<name>: { continuousDeployment: true }.

The Publish To Environment workflow is unaffected — it uses type: 'Publish' which ignores continuousDeployment entirely.

Changes

  • Actions/DetermineDeploymentEnvironments/DetermineDeploymentEnvironments.ps1: After per-environment settings are applied, fall back to settings.continuousDeployment if the per-environment value is still null
  • Actions/.Modules/ReadSettings.psm1: Add continuousDeployment = $null to default settings
  • Actions/.Modules/settings.schema.json: Add schema entry with type: ["boolean", "null"] — allows null to explicitly "unset" the global default, consistent with runtime semantics
  • Tests/DetermineDeploymentEnvironments.Test.ps1: Four new test cases covering the new behaviour
  • Scenarios/settings.md: Documentation for the new setting

Test Plan

  • Global continuousDeployment: false → all environments skipped for CD, EnvironmentCount = 0
  • Global continuousDeployment: false → Publish To Environment still includes environments
  • Global continuousDeployment: false + per-env DeployTo<name>: { continuousDeployment: true } → only that environment included
  • No global setting → existing name-based behaviour preserved ((PROD) excluded, others included)

Add documentation for the new top-level `continuousDeployment` setting
that provides a global default for all environments, overridable per
environment via DeployTo<name>.ContinuousDeployment.
@StefanMaron StefanMaron requested a review from a team as a code owner March 18, 2026 11:22
Copilot AI review requested due to automatic review settings March 18, 2026 11:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents the new global continuousDeployment repository setting and clarifies how it interacts with per-environment continuous deployment defaults/overrides.

Changes:

  • Adds a new settings table row documenting continuousDeployment.
  • Describes precedence between global default, per-environment name convention defaults, and per-environment overrides.
  • Provides a suggested configuration pattern for org-wide opt-out with per-environment opt-in.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Allow users to set a global `continuousDeployment` default at the
repository or organization settings level, rather than requiring
per-environment `DeployTo<name>.ContinuousDeployment` entries for
every environment.

The new top-level `continuousDeployment` setting acts as a fallback:
it is applied to an environment only when no per-environment setting
is present. Per-environment DeployTo<name>.ContinuousDeployment still
takes precedence, preserving full backwards compatibility.

Setting `continuousDeployment: false` in an organization settings
variable (ALGoOrgSettings) disables automatic CD across all repos and
all environments, while leaving the manual Publish To Environment
workflow unaffected (it uses type 'Publish', which ignores this flag).

The schema allows boolean and null to match the runtime semantics,
where null means "unset - fall back to name-based convention".
@StefanMaron StefanMaron changed the title Document global continuousDeployment setting Add global continuousDeployment setting Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Global continuousDeployment setting to disable automatic CD across all environments

2 participants