As part of our deployment process we have a step which runs a PowerShell script to perform some smoke tests on the artefacts we have just deployed.
We currently have a single server setup for this which has the role “SmokeTest” and the step is scoped to execute on “Deployment targets” in role “SmokeTest”. However, due to deployment mutex settings only 1 smoke test runs at a time.
We are considering adding a 2nd “SmokeTest” deployment target to increase throughput. However, we need to ensure that the step is only ran once (e.g. any one machine with role SmokeTest) and not on all deployment targets with role SmokeTest.
You should be able to do this by using Worker from a Worker pool. Basically instead of adding the SmokeTest machines as deployment target, add them as a worker in a worker pool, you could then configure your step to run once on a worker (see screenshot below). Workers is a new feature that we introduced from 2018.7.0, you could find more information from here
Our current Standard license has unlimit worker and pools, are you in a grandfather license and is there any reason from switching? Try to contact our sale team and see what they can do for licensing issues.
Otherwise, you could try adding a scope for each test server e.g. SmokeTest1, SmokeTest2. You can then scope the step to either one of them, the downside is you would need to change every project so that the workload can be distributed evenly.