deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.41k stars 1.47k forks source link

Restart from failed step #3806

Closed barryvdh closed 2 months ago

barryvdh commented 2 months ago

For some deployments (mostly Magento2) it can take a long time to deploy (eg 10 minutes). While this usually only leads to small downtime (during DB updates) it can happen that something fails (eg connection lost, wrong data in database, missing config, wrong PHP version etc), which can be easily fixed but currently you need to re-deploy the entire pipeline.

Would it be possible to add a 'dep deploy:continue' equivalent, so that we can restart the deployment on the failed step?. Eg start with the DB upgrade en then just symlink.

Maybe store the failed step in the deploy history, similar to locking it?

antonmedv commented 2 months ago

Deployer has a flag --start-from where you can specify a task you want to start from :)

$ dep deploy
...
$ dep deploy --start-from=deploy:update_code
barryvdh commented 2 months ago

Oh wow, missed that. Thanks!

Schrank commented 2 months ago

Technically it is documented here: https://deployer.org/docs/7.x/getting-started#deploy

I'm happy to make it better, I just don't know how. Because of that I'll close the issue - if you have ANY idea how to improve, tell me and I'm happy to reopen!