While working through a simple #eecms deployment idea, I had a few others. But first - a bit of context.

I keep all of our EE sites in individual Git repositories. We use Beanstalk as our origin branch and push/pull to/from there for most projects. We also utilize beanstalk for deployments.

Our dev branch is always set to automatically deploy to the development server upon each push to Beanstalk. Our master branch is manually deployed when we’re ready for that.

For our sites that use caching of any sort, we were regularly clearing the cache in the EE control panel after each deployment. I slowed down enough yesterday to realize that we should just automate that. Thankfully Beanstalk will run a pre and post deployment request which made this simple.

So I build a small module that clears the cache post-deployment. Short and sweet.

This got me thinking though…

Sometimes we have some queries we like to run pre or post deployment (like backups, test record removal, new tables etc). That got my brain thinking about using the module to check for .sql files and executing if necessary. This could automate even more of the process for me.

These things are often done with Git hooks if Git is installed on the destination server. We, however, do not install Git on our servers (yet). Beanstalk has removed that dependency for us. So this seems like an interesting idea.

As with most things, it’s a matter of testing and determining a solid scope of what to build. I’d love to know what you think if you have any thoughts to add.

So, what do you think?

  1. erikreagan posted this