0
votes

Azure devops with it's pipelines is fine to generate automate your builds. As far as I see, you can use

  • MS hosted agents for your jobs
  • Self hosted agents where you install the agent daemon

With Azure itself you can use ARM Template to build up machines on demand. It is pretty easy to use arm within your pipeline.

In my opinion it would be great, if I could build an agent-machine within a pipeline with an arm template and use that agent for the further build process. With that solution we could make use of all the cool pipeline-yaml-features (scripts, conditions, ....).

Is there a solution that connects azure devops with azure in that way?

2

2 Answers

0
votes

that wont really work, as you need an agent to run the template in the first place, so it doesnt make a lot of sense. what problem are you trying to solve with this approach apart from it being cool?

0
votes

As far as I know, this could be achievable.

ARM template supports to create VM and install Azure Devops agents at the same time.

Here is the ARM template Json file sample.

In Azure Pipeline, you need to add two agent job.

Agent Job1 : You need to use an existing agent to run the ARM template deployment task.

Agent Job2: You can specify a custom agent pool and add demands. (The ARM sample creates the agent in the Default agent pool by default)

For example:

enter image description here

In this case, you can specify agnet job to run tasks in the newly created agnet.

But as 4c74356b41 said, this may waste some resources.