Are PreDeploy, Deploy, and PostDeploy scripts kept in sync across machines?

Are PreDeploy, Deploy, and PostDeploy scripts kept in sync across machines during a single step?

I have a scenario where the Deploy script in a certain package will likely run much longer on Machine A than on the other machines in that environment, Machine B and C (it’s performing some database migrations). I want to make sure that the PostDeploy script doesn’t run on the other machines before the Deploy script has finished on Machine A.

Does it work like this? Or are they are executed independently?

It does not. It will finish a step as soon as it can, though it will not move onto the next step until the previous step has finished.

Using that info, the easiest scenario is to create a child step (or a whole new step) that will run and do whatever you wanted in the PostDeploy. That way the initial step will finish on all machines, THEN the PostDeploy will run on all machines.