Ensure a process step runs at least once

In my project I have a number of steps that are assigned to different roles based around the apps, eg App1, App2, App3 … App10

My machines (Machine 1 … Machine 5) have the roles assigned to them.

Is there a way that I can flag that a specific step has not been run during a process. For example, App2 must be deployed everytime, but if no machine in the environment has that role, then it will not be deployed. I need a warning that this has not occurred so I can fix it.

Currently the project just completes successfully as no machine is matched.


Thanks for getting in touch! This is a great question around tracking deployment status. Unfortunately using the system output variable Octopus.Step[StepName].Status.Code will currently populate with Succeeded if the step is skipped due to no machines being in the target role, so it’s not much help. I’ve had a couple of discussions with my team and we’ve decided that it should evaluate to something unique to allow you to write run conditions based on this status. I’ve raised the following enhancement, and you can track its progress here.

There may be a workaround for the time being. You could have a script step with the same role as the deploy step (App2) which sets an output variable, then have another script step with some logic based on whether it sees this output variable. Would something like this help in your scenario?

Let me know what you think or if you have any further questions moving forward. :slight_smile:

Best regards,


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.