1

I have one azure devops organization with 1 project, using the organizations deployment pool. I've recently created a second project (newProject2) and want to use these same agents in the organizations pool. Without configuring anything, the pools already show up in newProject2. See below: pools

However, when I want to reference them in my .yml pipeline, like so: yaml pool ref

I get the following message while trying to execute the pipeline: Enviroment required. However, all the agents installed on the machines are registered in the other project's environment and I have to install a new agent on the same machine to have them show up in newProject2. This is understandably not recommended and a dead end. As I understand it, the usage of a deployment group is only available in a classic pipeline. This has several drawbacks which I won't go into here.

My question is: Is it possible to deploy to an existing deployment pool from multiple (a different/secondary) projects (in a .yml pipeline) and if so, how?

MyName
  • 180
  • 1
  • 2
  • 19

1 Answers1

1

Is it possible to deploy to an existing deployment pool from multiple (a different/secondary) projects (in a .yml pipeline) and if so, how?

I am afraid that there is no such method could achieve your requirements for the time being.

There are two limits:

1.In YAML Pipeline, we could only use the Pipeline Environments. The deployment group couldn't be using in YAML pipeline.

For more detailed info, you could refer to this doc: Deployment group jobs

2.When you share the pipeline env between projects, it is shared in the form of a deployment group.

Therefore, the same pipeline environment cannot be reused in YAML pipelines of different projects.

But your requirement makes sense.

Here are the suggestion tickets in our UserVoice site:

Use Deployment groups in a multi-stage yaml file.

Shared Pipeline Environments within Projects

Kevin Lu-MSFT
  • 20,786
  • 3
  • 19
  • 28
  • 2
    Thanks for the answer Kevin and the links. This feature seems past "nice-to-have" to me. I'll vote accordingly on the M$ boards. – MyName May 10 '21 at 06:07