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.

Comments

gdd’s picture

Status: Active » Needs review
StatusFileSize
new9.14 KB
dixon_’s picture

Assigned: Unassigned » dixon_
Status: Needs review » Needs work
StatusFileSize
new6.95 KB

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.

dixon_’s picture

Status: Needs work » Needs review
StatusFileSize
new7.84 KB

Here is a new patch that works with the new deployment workflow (pluggable authentication). It also removes the --confirm option as that duplicates the built in -y option 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.

gdd’s picture

Status: Needs review » Needs work

I 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.

teastburn85’s picture

I downloaded the 2010-Aug-28 release of 6.x-1.x-dev and applied 893828_drush_options-3.patch and 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." --confirm was not removed in the patch.

Thanks!

gdd’s picture

Status: Needs work » Needs review
StatusFileSize
new7.95 KB

Attached 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.

dixon_’s picture

Yeah, I removed the confirm functionality as drush has built-in support for annwering "yes" to all confirmations. Just pass -y to your drush command.

I will test the patch during this week. Hopefully tomorrow.

dixon_’s picture

StatusFileSize
new8.73 KB

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.

dixon_’s picture

Issue tags: +beta blocker

This should be done before we roll a beta.

dixon_’s picture

Priority: Normal » Critical
groovehunter’s picture

would be great to have -

and in settings to save the default server, user and password in the UI would be nice too.

subscribing...

dixon_’s picture

Status: Needs review » Fixed

Patch in #8 committed. It still works perfectly from my manual tests.

Status: Fixed » Closed (fixed)
Issue tags: -beta blocker

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