deploy:symlink rm: cannot remove 'release'
Sometimes i receive a fail on step deploy:symlink. it's not a permanently fail. I get this one time out of ten
| Q | A |
|---|---|
| Issue Type | Bug, Question |
| Deployer Version | 6.4.3 |
| Local Machine OS | Ubuntu16.04 |
| Remote Machine OS | N/A |
| PHP | 7.3.0 |
Content of deploy.php
<?php
namespace Deployer;
require 'recipe/laravel.php';
set('repository', 'repo.git');
set('http_user', 'www-data');
add('shared_files', [
'.env'
]);
add('shared_dirs', [
'storage',
'node_modules',
]);
add('writable_dirs', [
'bootstrap/cache',
'storage',
]);
localhost('local')->set('deploy_path', '/var/www/project');
task('build', function () {
run('cd {{release_path}} && gulp');
});
task('deploy', [
'deploy:prepare',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:vendors',
'deploy:writable',
'build',
'artisan:down',
'deploy:symlink',
'php-fpm:restart',
'artisan:up',
'deploy:unlock',
'cleanup',
]);
after('deploy:failed', 'deploy:unlock');
after('deploy:failed', 'artisan:up');
before('deploy:symlink', 'artisan:migrate');
Output log
➤ Executing task deploy:symlink
[local] > if [[ $(man mv 2>&1 || mv -h 2>&1 || mv --help 2>&1) =~ '--no-target-directory' ]]; then echo 'true'; fi
[local] < sh: 1: [[: not found
[local] > cd /var/www/project && ln -nfs /var/www/project/releases/176 current
[local] > cd /var/www/project && rm release
[local] < rm: cannot remove 'release'
[local] < : No such file or directory
➤ Executing task deploy:failed
Really strange, did you go to server and check if release symlink are there?
Really strange, did you go to server and check if release symlink are there?
Release symlink is not there
Can you watch and understand whenrelease symlink deleted?
Is it completely random or does it follow any kind of pattern? The "[[ not found" issues points to your shell not being bash, since [[ ]] is a bash builtin. Can you post the output of deploy:release too?
I am cleaning up on issues. Fill free to reopen if needed. Also, we have a new section available: discussions.