Skip to content
This repository was archived by the owner on Jul 1, 2022. It is now read-only.

Generic commands #38

Merged
merged 12 commits into from
Apr 27, 2015
Merged

Generic commands #38

merged 12 commits into from
Apr 27, 2015

Conversation

xendk
Copy link
Member

@xendk xendk commented Apr 16, 2015

Reworks running of external commands to being generic pre/post hooks.

@richardbporter
Copy link
Contributor

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 --no-updb kill switch.

@xendk
Copy link
Member Author

xendk commented Apr 17, 2015

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?

@xendk
Copy link
Member Author

xendk commented Apr 17, 2015

There, that's fixed.

@ghost
Copy link

ghost commented Apr 19, 2015

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.

@richardbporter
Copy link
Contributor

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.

@xendk
Copy link
Member Author

xendk commented Apr 20, 2015

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.

xendk added a commit that referenced this pull request Apr 27, 2015
@xendk xendk merged commit 63815dc into master Apr 27, 2015
@xendk xendk deleted the generic-commands branch April 27, 2015 06:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants