Executing child steps on a subset of the roles of the parent step


I have a “Deploy NuGet Package” step with a lot of child steps that perform some fine tuning. I have two roles: web-back and web-front indicating machines that lie inside our network and outside. 90% of the child steps are the same, but I do have 10% of the fine tuning that is specific for each of the roles.

Right now I have the NuGet step (with all the child steps) and the other role-specific fine-tuning steps which follow afterwards (not as child steps, but as normal ones). This works fine so far, however I want to be able to detach/attach from Load Balancer these machines and this will require that all the fine-tuning lies inside the deploy NuGet package step.

It would be useful for me if I could select a subset of the roles specified for a step for some of its child steps. This way I can include the role-specific fine tuning in the parent step. Do you have any idea how to work-around this? Currently I am thinking about putting a property “Enabled” to my steps (as they are PowerShell scripts) and based on a variable to execute or not.


Hi Boyan,

Thanks for reaching out! This isn’t possible at the moment, but I personally think its not a bad suggestion at all, so I went ahead and created a uservoice suggestion for it to see if the community would like this to happen: https://octopusdeploy.uservoice.com/forums/170787-general/suggestions/13316913-add-ability-to-run-child-steps-for-a-sub-set-of-th . Please try to drop by and add some votes to it.

At the moment, the Powershell flag with a variable scoped by step would be my recommended approach too given that they are all script steps apparently.


Thanks, Dalmiro