In Azure Pipelines, we have Deployment Groups & Environments as separate options but are they both not suppose to add a list of server belonging to an environment as a group. Clarification on this would be highly appreciated.
4 Answers
Difference between Deployment Groups and Environments in Azure DevOps Services\Server
In simple terms, deployment groups is that:
A deployment group is a logical set of deployment target machines that have agents installed on each one. Deployment groups represent the physical environments; for example, "Dev", "Test", "UAT", and "Production". In effect, a deployment group is just another grouping of agents, much like an agent pool.
And environment is that:
Environment represents a collection of resources such as namespaces within Kubernetes clusters, Azure Web Apps, virtual machines, databases, which can be targeted by deployments from a pipeline.
Personal Opinion:
They both have the same theory in actual deployment. But, since Deployment group jobs are not yet supported in YAML. In this case, the Environments comes up. As you can get following state from the document:
While environment at its core is a grouping of resources, the resources themselves represent actual deployment targets. The Kubernetes resource and virtual machine resource types are currently supported.
Besides, the environment has a series of advantages:
- Deployment history
- Traceability of commits and work items
- Diagnose resource health
- Permissions
Hope this helps.

- 71,098
- 10
- 114
- 135
-
Helpful, but the same documentation you reference notes deployment groups in "Classic", which suggests environments is the way to go. I am still wondering what the underlying technical implications are when it comes to internally hosted shared (2+ app or db) VMs. If you've any insight on that it would be helpful. – one.beat.consumer Mar 04 '20 at 17:48
-
3Good summary. I'll add that it seems like Environments can't be registered as easily as deployment groups right now. For dep. groups there are 3 install methods one of them being an extension in Azure. Registering environments seems to require manually running install command on the VMs, and the command is _copied_ from the DevOps UI. – E. Sundin Dec 02 '20 at 12:56
-
Environments: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/environments?view=azure-devops Deployment Groups: https://learn.microsoft.com/en-us/azure/devops/pipelines/release/deployment-groups/?view=azure-devops – m1m1k Sep 14 '21 at 15:28
A deployment group is basically a set of deployment target machines or physical environments, which are machines in which an agent is installed.
Environments are a group of resources like Azure Web Apps, virtual machines, databases etc.. which targets a deployment
both can have different groups for Dev, Test, UAT, and Production

- 521
- 1
- 7
- 23
Both helps us to connect with deployment target server. Deployment group is for classic pipeline and Environments is for YAML pipeline.
Each environment creates an implicit deployment group Environment-{EnvironmentID}-{Guid}.
Unfortunately from the environment UI you cannot see the status of the resources which is extremely annoying, you also cannot see the tags without click on each resource and choosing manage tags. The UI for environments is extremely basic.

- 1,303
- 15
- 30