Attached is a drush include file that provides a deploy command for drush.

It will prompt for which plan, server, username and password to use and then confirm whether to proceed with the deployment. The option --progress-bar can be used to cause information about current deployment status to be printed to stdout.

It was developed against drush All-Versions-3.0

CommentFileSizeAuthor
#2 deploy.drush_.inc_.zip1.05 KBkatbailey
deploy.drush_.inc_.gz1016 bytestekante

Comments

gdd’s picture

Status: Active » Needs review

This is a great contribution! I will try and get it tested soon, unfortunately my local Drush installation is currently messed up. I've pointed a couple other Deploy users here as well so we can get some more people trying it.

katbailey’s picture

StatusFileSize
new1.05 KB

This is really nice! I made some changes that made it suit my needs better but not sure what anyone else thinks:
- to get the list of plans it calls deploy_get_plans() which, if you don't pass it TRUE as its only parameter, excludes internal plans. I've changed it so that if you do "drush deploy all" it will pull the list of all plans, including internal ones*
- added a check to see if there are any plans, otherwise it gives a php error
- removed the progress bar code and instead passed 'ok' as the $type parameter to drush_log() so that it prints out each item as it's deployed. This seems to me like nicer feedback.

* My reason for this is that in my incremental_deploy module (which I'll put in my sandbox tomorrow) I'm creating internal plans (they get created automatically so I thought that was reason enough to flag them as internal but perhaps I'm wrong!) and I want these to be deployable from the command line. Having said that I'd also like a way of excluding certain plans from being listed as deployable, but that would require yet another hook in deploy module... one step at a time ;-)

gdd’s picture

Status: Needs review » Fixed

Well four months later, new laptop, Drush is setup and I am finally testing this patch which is FREAKING AWESOME. Wow do I suck for letting this sit so long. There are two things I'd like to see as additions

- I like both the progress bar and file list outputs, and I can see where depending on the situation you might want either/or. If you're doing a big deployment the file list will be a LOT of text that you don't necessarily want. You just want to know whether or not you have time to go get lunch. On the other hand, the all files output would be incredibly useful for logging. So I'm tempted to make it be silent by default, with -show-progress and -show-files being options.

- Can you pass in all the options from the command line? IE drush deploy 1 1 user pass? It would be nice to be able to do that because then the deployments can be scripted from cron/other shell scripts.

However given how long it took me to get to even testing this, I'm reluctant to hold it up since it is so incredibly useful and works and who knows when I'll be back in this queue again. So I've added some docs and committed it. I'll make followup issues for the rest.

Thanks much.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.