Continuous Integration
Disabling the debug module toolbar button
The debug button that appears on the top right corner of each module's toolbar is useful for development - developers can find out what variables are available inside a module, so that they can be used in the template of the module.
In production, this button should be disabled, it serves no purpose for the editors.
To do so, in the project's repository, go to Settings -> CI/CD, in the Variables sections add NODE_ENV
variable with the value production
Note: It's production
, NOT prod
. The first one ("production") is more prevalent in NodeJS world, while "prod" is recommended by Symfony.
You need to make sure that this variable is being passed from the CI/CD environment to the ansible playbook. Check the .gitlab-ci.yml
file at the root of the project, in the build
stage, the script
should contain -e "NODE_ENV=${NODE_ENV}"
:
build:
stage: build
script:
- ansible-playbook -v build/provision/vagrant/build.yml -e "NODE_ENV=${NODE_ENV}"