New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The command "readlink" failed #2440
Comments
Try removing the Main deploy task from your deploy.php file. I found that some tasks are not executed when using deploy from your deploy.php file. The Main deploy task is already defined in the laravel.php file (bottom), so it is duplicate anyways. Example of the first output steps you should expect:
While in the recipe file, only
are listed as tasks, the other steps are apparently hooked in by deployer. |
How should we add all our custom tasks without having the main deploy task in our deploy.php ? |
You can use the I have no idea why main task in deploy.php is not working. |
I believe this is not a problem, you can easily redefine deploy task in your deploy.php file. |
Yes you can, but a lot of the tasks are missing if deploy is in deploy.php. For example I simply copied the deploy task from magento2 recipe to the deploy.php and it resulted in a lot less tasks executing. |
This is strange behaviour, and looks like a bug. |
Actually source of error is
You need to make a release before (via deploy:release) |
Why is it needed to do deploy:release in deploy.php and not inside recipes? |
Because you defining your own |
-86_64 x86_64 x86_64 GNU/Linux
Readlink fails since the "current" link never been created
Example Deploy.php:
Output:
`# dep deploy -vvv
➤ Executing task deploy:prepare
[localhost] > echo $0
[localhost] < sh
[localhost] > if [ ! -d /var/www/api ]; then mkdir -p /var/www/api; fi
[localhost] > if [ ! -L /var/www/api/current ] && [ -d /var/www/api/current ]; then echo 'true'; fi
[localhost] > cd /var/www/api && if [ ! -d .dep ]; then mkdir .dep; fi
[localhost] > cd /var/www/api && if [ ! -d releases ]; then mkdir releases; fi
[localhost] > cd /var/www/api && if [ ! -d shared ]; then mkdir shared; fi
• done on [localhost]
✔ Ok [25ms]
➤ Executing task deploy:vendors
[localhost] > if hash unzip 2>/dev/null; then echo 'true'; fi
[localhost] < true
[localhost] > if [ -h /var/www/api/release ]; then echo 'true'; fi
[localhost] > readlink /var/www/api/current
➤ Executing task deploy:failed
• done on [localhost]
✔ Ok [0ms]
➤ Executing task deploy:unlock
[localhost] > rm -f /var/www/api/.dep/deploy.lock
• done on [localhost]
✔ Ok [6ms]
In Process.php line 250:
[Symfony\Component\Process\Exception\ProcessFailedException]
The command "readlink /var/www/api/current" failed.
Exit Code: 1(General error)
Working directory: /var/www/api_test
Output:
Error Output:
Exception trace:
at phar:///usr/local/bin/dep/vendor/symfony/process/Process.php:250
Symfony\Component\Process\Process->mustRun() at phar:///usr/local/bin/dep/src/Utility/ProcessRunner.php:56
Deployer\Utility\ProcessRunner->run() at phar:///usr/local/bin/dep/src/functions.php:301
Deployer\run() at phar:///usr/local/bin/dep/recipe/common.php:98
Deployer\Deployer::Deployer{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/dep/src/Configuration/Configuration.php:68
Deployer\Configuration\Configuration->get() at phar:///usr/local/bin/dep/src/functions.php:549
Deployer\get() at phar:///usr/local/bin/dep/recipe/deploy/release.php:92
Deployer\Deployer::Deployer{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/dep/src/Configuration/Configuration.php:68
Deployer\Configuration\Configuration->get() at phar:///usr/local/bin/dep/src/Configuration/Configuration.php:112
Deployer\Configuration\Configuration->parseCallback() at n/a:n/a
preg_replace_callback() at phar:///usr/local/bin/dep/src/Configuration/Configuration.php:98
Deployer\Configuration\Configuration->parse() at phar:///usr/local/bin/dep/src/functions.php:761
Deployer\parse() at phar:///usr/local/bin/dep/src/functions.php:286
Deployer\run() at phar:///usr/local/bin/dep/recipe/deploy/vendors.php:15
Deployer\Deployer::Deployer{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/dep/src/Task/Task.php:105
Deployer\Task\Task->run() at phar:///usr/local/bin/dep/src/Executor/SeriesExecutor.php:60
Deployer\Executor\SeriesExecutor->run() at phar:///usr/local/bin/dep/src/Console/TaskCommand.php:144
Deployer\Console\TaskCommand->execute() at phar:///usr/local/bin/dep/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/dep/vendor/symfony/console/Application.php:924
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/dep/src/Console/Application.php:133
Deployer\Console\Application->doRunCommand() at phar:///usr/local/bin/dep/vendor/symfony/console/Application.php:265
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/dep/vendor/symfony/console/Application.php:141
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/dep/src/Deployer.php:326
Deployer\Deployer::run() at phar:///usr/local/bin/dep/bin/dep:136
require() at /usr/local/bin/dep:4
deploy [-p|--parallel] [-l|--limit LIMIT] [--no-hooks] [--log LOG] [--roles ROLES] [--hosts HOSTS] [-o|--option OPTION] [--] []`
The text was updated successfully, but these errors were encountered: