I have expanded the Drush integrations to allow for unattended deployments by specifying everything you need as options at the command line. This will allow for completely automated deployments that can be, for instance, run out of cron. The options are, as pasted from the help:
'user' => 'The remote username this deployment should run as.',
'password' => 'The remote user\'s password.',
'plan' => 'The pid of the plan you want to deploy.',
'server' => 'The sid of the server you want to deploy to.',
'confirm' => 'Set this to false to skip the confirmation step.',
'silent' => 'Setting this to any value will suppress the file listing on deployment.',
NOTE: The password must be unencrypted and embedding it in commands can be a security risk depending on the context.
Patch to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 893828_drush_options_8.patch | 8.73 KB | dixon_ |
| #6 | 893828_drush_options.patch | 7.95 KB | gdd |
| #3 | 893828_drush_options-3.patch | 7.84 KB | dixon_ |
| #2 | 893828_drush_options-2.patch | 6.95 KB | dixon_ |
| #1 | 893828_drush_options.patch | 9.14 KB | gdd |
Comments
Comment #1
gddComment #2
dixon_That patch seems to include a bit too much (
deploy.install)? Here is a reroll that also fixes some small whitespace issues. But this patch will also need some adjustments to work with the pluggable authentication system, that I committed today. I'll take a look at this during the day.Comment #3
dixon_Here is a new patch that works with the new deployment workflow (pluggable authentication). It also removes the
--confirmoption as that duplicates the built in-yoption in Drush that answers "yes" on all confirmations.Everything works as expected for me. Leaving the patch here for a review before I commit anything.
Comment #4
gddI obviously need a better workflow for dealing with multiple patches, I seem to always be pulling multiple changes in.
Will we be able to grab the values from pluggable authentication and manage it that way? Hm.
Comment #5
teastburn85 commentedI downloaded the 2010-Aug-28 release of 6.x-1.x-dev and applied
893828_drush_options-3.patchand it seems to work. I was able to deploy comments multiple times from a PHP script just fine. However, didn't see the change that dixon_ noted: "It also removes the --confirm option as that duplicates the built in -y option in Drush that answers "yes" on all confirmations."--confirmwas not removed in the patch.Thanks!
Comment #6
gddAttached patch removes reference to confirm flag in the help text (it appears it was actually removed functionally.) I still want to test this a little but it looks good.
Comment #7
dixon_Yeah, I removed the confirm functionality as drush has built-in support for annwering "yes" to all confirmations. Just pass
-yto your drush command.I will test the patch during this week. Hopefully tomorrow.
Comment #8
dixon_Here is an updated patch with some better error handling. It's based from the patch #6.
I think this is ready to go in, especially considering that the current implementation is plain broken when we got the pluggable authentication in.
Comment #9
dixon_This should be done before we roll a beta.
Comment #10
dixon_Comment #11
groovehunter commentedwould be great to have -
and in settings to save the default server, user and password in the UI would be nice too.
subscribing...
Comment #12
dixon_Patch in #8 committed. It still works perfectly from my manual tests.