I have a custom machine policy that checks if certain items exist, and if they do are they running (websites, windows services, etc.). This then fails the health check if they are not. If a “Check Tentacle Health” task is triggered during a deployment, this may mean that the environment fails its health check.
How can I check within a machine policy script if a deployment is currently running within an environment, and skip the tests if it is?
An example is in Octo.exe using the command list-latestdeploymentshttps://octopus.com/docs/api-and-integration/octo.exe-command-line as part of the details you get back you will see State: Executing and you’ll be able to filter by ‘environment’, and get your health check script to factor that in.