Output variables

I have a rolling deployment that deploys to multiple tentacles - several at a time.

From one tentacle I want to detect the deployment status of another tentacle. I want tentacle B to wait until tentacle A is at a certain point in the deployment process. So I created a step where tentacle A sets the value of an output variable. Then I have a powershell step that tentacle B uses that enumerates through $OctopusParameters to find the output variable. If it isn’t found, it sleeps and loops until it is set.

However, if the “look for the variable” step of tentacle B starts before the variable is set by tentacle A, tentacle B will never see the value - even after the value is set by tentacle A.

  1. Is that expected behavior?
  2. Is there some other way to accomplish what I’m trying to do?

Hi Jake,

Thanks for getting in touch! I am sorry to say I don’t think I have a great answer for you.
Output variables are only available after a step completes and are only evaluated for a step before it begins. So constantly looping through the output variables on B will not produce the correct results as they never change, unless A has already completed before B starts.
to work with this behaviour you would have to be sure that A completed first before B started.

Sometimes customers will try to get around this by creating a file during a set of steps using PowerShell as either a lock or a variable storage, you could experiment with that. It is all I can really think of for this specific scenario.

Sorry if it isn’t the answer you were hoping for.


This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.