Closed mfickers closed 11 months ago
I suspect that this was broken by this commit: https://github.com/deployphp/deployer/pull/3453/commits/bf1d11d16286f3fe1451d0629f0fcdda31608890
This change moved the check to around the hooks. The problem is, the flag will always be false
when this condition is executed, as this happens during parsing of the recipe and not at runtime.
According to this comment https://github.com/deployphp/deployer/pull/3453#issuecomment-1490310266, the change was made to prevent the steps from showing up if they are not executed. If anyone has an idea on how to fix this without breaking this behavior, I'll gladly create a PR.
As a workaround I've re-declared the missing steps in my script:
<?php
namespace Deployer;
require 'recipe/magento2.php';
// Config
set('use_redis_cache_id', true);
// Workaround
if (get('use_redis_cache_id')) {
after('deploy:shared', 'magento:set_cache_prefix');
}
if (get('use_redis_cache_id')) {
after('deploy:magento', 'magento:cleanup_cache_prefix');
}
Looks like this is already fixed in master
, as part of this PR: https://github.com/deployphp/deployer/pull/3567. The flag has been removed and the user should instead include the steps in their script. I'm closing this issue.
The
use_redis_cache_id
is ignored in custom deploy scripts extending the Magento 2 recipe.Environment
Steps to reproduce:
require 'recipe/magento2.php';
// Config set('use_redis_cache_id', true);
./vendor/bin/dep tree -f deploy.php deploy
The task-tree for deploy: └── deploy ├── deploy:prepare │ ├── deploy:info │ ├── deploy:setup │ ├── deploy:lock │ ├── deploy:release │ ├── deploy:update_code │ ├── deploy:shared │ ├── magento:set_cache_prefix // after deploy:shared │ └── deploy:writable ├── deploy:vendors ├── deploy:clear_paths ├── deploy:magento │ ├── magento:build │ │ ├── magento:compile │ │ ├── magento:sync:content_version // before magento:deploy:assets │ │ └── magento:deploy:assets │ ├── magento:maintenance:enable-if-needed │ ├── magento:config:import │ ├── magento:upgrade:db │ ├── magento:maintenance:disable │ └── magento:cache:flush ├── magento:cleanup_cache_prefix // after deploy:magento └── deploy:publish ├── deploy:symlink ├── deploy:unlock ├── deploy:cleanup └── deploy:success
The task-tree for deploy: └── deploy ├── deploy:prepare │ ├── deploy:info │ ├── deploy:setup │ ├── deploy:lock │ ├── deploy:release │ ├── deploy:update_code │ ├── deploy:shared │ └── deploy:writable ├── deploy:vendors ├── deploy:clear_paths ├── deploy:magento │ ├── magento:build │ │ ├── magento:compile │ │ ├── magento:sync:content_version // before magento:deploy:assets │ │ └── magento:deploy:assets │ ├── magento:maintenance:enable-if-needed │ ├── magento:config:import │ ├── magento:upgrade:db │ ├── magento:maintenance:disable │ └── magento:cache:flush └── deploy:publish ├── deploy:symlink ├── deploy:unlock ├── deploy:cleanup └── deploy:success