-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
skip when a host fails to prevent all hosts failing during deployment #3172
Copy link
Copy link
Closed
Description
I'm using Deployer PHP version 6. I'm using many hosts, about 15 and to deploy to all of them takes a solid hour. When a host fails to deploy, for instance an error, it causes all the other hosts to automatically fail, this is extremely inconvinient as if a single host fails out of 15 45 mins into a deployment, I have to start again, potentially taking an entire day to deploy.
What option do i need to add to my host list to skip on failure of a host?
my deploy file
<?php
namespace Deployer;
require 'vendor/autoload.php';
require 'recipe/common.php';
require 'deploy/recipe/fudge-npm.php';
require 'deploy/recipe/fudge-composer.php';
require 'deploy/recipe/fudge-nuxt.php';
require 'deploy/recipe/fudge-duration.php';
require 'deploy/recipe/fudge-github.php';
// Project repository
set('repository', 'git@github.com:company/application-fudge.git');
// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true);
// [Optional] Timeout in seconds, set to 14,400 (4 hours) for max compatibility.
set('default_timeout', 14400);
// Shared files/dirs between deploys
add('shared_files', ['.env', 'brand-theme.scss']);
// Set number of releases to keep
set('keep_releases', 2);
// Writable dirs by web server
set('allow_anonymous_stats', false);
// All brands
// See the README.md for list of friendly brand names for these hosts.
host('ipv6', 'ipv6', 'ipv6')
->set('branch', 'main')
->stage('all')
->set('repository', 'git@fudge:company/application-fudge')
->user('root')
->set('deploy_path', '/var/www/include-forms/fudge');
// deploy
task('deploy', [
'deploy:duration:datetime:start',
'deploy:github:validate',
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'npm:install',
'composer:install',
'deploy:shared',
'deploy:writable',
'nuxt:generate',
'deploy:clear_paths',
'deploy:symlink',
'deploy:unlock',
'cleanup',
'success',
'deploy:duration:datetime:finish'
]);
// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels