-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
So far so good. One thing I noticed is that if I run a pre/post switch should the switch run if an associated killSwitch is used at the same time? For example, I implement a pre-updb switch but do a one-off deployment with the |
Good catch. I've added a test for it. I'll fix it as soon as possible. You tried doing a deploy on a real (test-)site? |
There, that's fixed. |
I think this is an excellent approach and opens possibilities for other commands as well. However I'll be bit more concerned about the procedure when the command fails, for instance if the apache fails to restart as post command then deployotron shouldn't fail as a whole process, but gentle reminder to user about failed process would be appreciated. I will try this branch today with clone of some real site at some point. |
Yes, I've tested this on a couple sites and it works great. Like @rajibmp said, there's no real validation for the custom commands but that seems like a decent tradeoff for the flexibility. |
I'm not too fond of allowing commands to fail. It's a slippery slope. Either your deployment depends on the command, in which case the deployment needs to fail, or it really doesn't, and then why is it part of the deployment? But I'd suspect that "sudo apache2 graceful || true" might work to the same ends. |
Reworks running of external commands to being generic pre/post hooks.