How to query the result of a Deploy Release step?

Hello. I am creating a project which has a Deploy Release step - that step triggers the deployment of another project. The Deploy Release step is defined to “Deploy if the selected release is not the current release in the environment.”

In a later process step, I want to check if that Deploy Release was actually executed and a deployment occurred. I was hoping that I could query an Output Variable or similar, but I can’t find one that tells me if a deployment actually occurred.

Is there another way I could query the result of the Deploy Release step? We are running Octopus Deploy v2018.9.8.



Hi Christopher,

Thanks for getting in touch!

The easiest way to achieve this would be to create your own Output Variable in the child project and then retrieve that value in a script within the ‘Deploy a Release’ project.

You may need to place that output into another output variable in your master project in order to be able to use it in a later step.

Child Project
Deployment Step Post Deploy Script:
Set-OctopusVariable -name "Deployed" -value "True"

Master Project
Script Step:
Check value of $OctopusParameters["Octopus.Action[Deploy Web Project].Output.Deployment[ChildProject].Deployed"]

I hope this helps, let me know if you have any further questions.

Best regards,

Thanks very much Paul - that’s a good solution. I’ve tried it out and it fits well with our release plans.


1 Like