Can we change V-Next release agent pools dynamically?

52 views Asked by At

I have a Team project and the build and releases configured in multiple geographical locations. Since all the geographical locations are having its own drop locations and agents as well.

So here my question is, the release agent pool has to be selected while creating the release job. So is it possible to change this release agent pool dynamically while I trigger the build associated with that release?

Scenario : People from India and US can run the build job (since it is common), The build is manual trigger so we have the freedom to choose build agent pool of India or US but the subsequent release is an automated trigger, so is it possible to trigger the release in the agents in respective country?

(eg, if a developer run the job from India, then the release job should run in release agents in India similarly it should trigger in US release agent if somebody triggers it from US).

Any help would be appreciated.

1

There are 1 answers

0
Etch On

I agree with the comment above that it shouldnt really matter.

If you absolutely had to do this, I would look at custom conditions. You could set up your release definition to have 2 phases, 1 with India agents and 1 with US agents. You can then write some script that determines "did a us person generate the build? and set that variable".

"##vso[task.setvariable variable=testvar;]testvalue"

You can then set the custom conditions on the tasks so it looks at that variable and runs accordingly.