Target Roles vs specificmachine command line arguement

So let’s say an environment has 10 machines. Half of the 10 have been labeled with a target role, “target1”. My project, “project1”, has a deployment step that deploys to target1 machines.

Now in TeamCity I have 2 build configs for project1: one that deploys to the machines with the target1 target role, and another that targets the other 5 machines. So in the additional command line arguments for the second build config i specify “–specificmachines mach1, mach2, mach3, mach4, mach5”. If I run the second build config, am I guaranteed that the machines with the target1 won’t be deployed to? I am doing this to work around having to clone the project in Octopus.



Thanks for getting in touch! I think there may be a better approach to achieve what you are after. if you were to use two separate Environments for your machines. You can put 5 of your machines into one environment and the other 5 into a different environment. You can then decide which environment to deploy to and never both.

As a note, when using the command line method. Apart from providing the ability to make mistakes, Octopus won’t deploy to machines outside of a role if roles are specified by steps.

Let me know if that helps or if you have any further questions. :slight_smile: