We have a dev server hosting webservices from multiple Azure DevOps projects. To use yaml deployment pipelines, we migrated from deployment pools to environments/resources. Unlike deployment pools neither environments nor resources can be shared between projects. You can upvote here to change that.
We work around this as follows.
- Create an environment for each project.
- For each environment add the dev server as a resource.
- Install one environment agent per project on the server.
Unfortunately, this creates a naming conflict if there is already an environment agent installed on the server.
The service already exists: vstsagent.MyDevOpsAccount..MyServer, it will be replaced
Error: Operation CreateService failed with return code 1072