netz98 / n98-deployer Goto Github PK
View Code? Open in Web Editor NEWConfiguration, Recipes, Tasks etc. for Deployer
License: MIT License
Configuration, Recipes, Tasks etc. for Deployer
License: MIT License
I am building a deploy pipeline and so far I have found no need to grant sudo access to the deploy user.
However the Cleanup task uses sudo to remove old release folders. Is there any need I am not seeing?
Release folders are being generated with the same user that runs the pipeline commands and any user-generated content (which would be owned by apache) are in shared folders...
I noticed there is a MagentoTask to import CMS content. however, there is no cms:import command in Magento CLI and I couldn't find any reference to it by googling.
Is this a custom proprietary module or is it based on a published library that I simply missed to locate in the internets?
thank you
The realpath command is not being distributed in most up to date versions of almost every major linux distribution (at least this seems to be the case for the Debian and RHEL families).
It is being used in N98\Deployer\Task\DeployTasks::initStableRelease()
to determine the current stable release (the target of the current symlink)
I have worked around this issue by aliasing realpath
to readlink -f
but you should probably consider updating the code as well
I've noticed that after every deploy that adds or updates a module, the deployed environment dies and an error similar to this is shown:
There has been an error processing your request
Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Vendor_Module schema: current version - none, required version - 0.1.0
Vendor_Module data: current version - none, required version - 0.1.0
Effectively after running the suggested command in the environment everything works.
I am using the provided example pipeline which includes a step MagentoTasks::TASK_SETUP_UPGRADE
and the corresponding output in Jenkins is
โค Executing task magento:setup_upgrade
โ Ok
So I looked under the hood and found that that task ends up running \Deployer\run("php bin/magento setup:upgrade --keep-generated");
which seems to be ok, but I wondered about the --keep-generated
flag.
Looking at the help for the flag it states: Prevents generated files from being deleted.We discourage using this option except when deploying to production. Consult your system integrator or administrator for more information.
So I am consulting with you guys. =D
To be honest, that doesn't feel like it's the source of the issue but somehow magento is unaware of the run to setup:upgrade.
Maybe it is running in the wrong version folder?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.