Outreach: May First's internal CiviCRM database
May First maintains our own CiviCRM installation via a standard hosting order
using the address outreach.mayfirst.org.
It’s running CiviCRM Standalone.
Code base
The entire site (except the public and `private’ file directories) is kept in git.
The main code we maintain is in the “mayfirst” CiviCRM extension. This code provides our custom membership workflow, displays, scheduled jobs, reports and other functionality.
Tests
Note: running tests in this manner is no longer working. Needs a fix!
Our custom CiviCRM extension has a tests directory that can be used to ensure our custom membership functionality is working after an upgrade.
To setup your system to run tests, take these one time steps:
- Ensure you have a working local copy of the Outreach CiviCRM database.
- Download the
cvtool. - Create your
cv.jsonfile (see setup, mostly you have to edit theTEST_DB_DSNvalue, adding a username and password with root access to your database and a database name that will be used for the tests). - Install phpunit.
- Change into the mayfirst extension’s directory
- For each file in
tests/phpunit/Civi/Mayfirst/(except MayfirstBase.php) run:phpunit /path/to/test.
Extensions
Always install copy of database locally and test on local copy first.
The extensions are in the web/ext directory and included in the git repo.
But, with the exception of our custom extensions, they are downloaded via the
UI.
Custom
We maintain two extensions directly in the outreach git repo:
mayfirst: holds all of our custom code.gowanus: simple extension providing our public facing theme overrides.
You can make changes directly to these files and commit them in git.
Contrib
When upgrading or installing new contrib extensions:
- upgrade/install via the CiviCRM UI
- test
- commit changes
- push changes to live
- run
cv --user=admin upgrade:db
Core Upgrades
- Delete the
coredirectory. - Download the upgraded version and unpack it.
- Run
cv upgrade:db - Update language files: `Administer -> Localization -> Languages, Currency, Locations -> “Update Language Files” (button)
- Test locally
- Commit changes and push to live
- Run
cv upgrade:dbon live site. - Update language files: `Administer -> Localization -> Languages, Currency, Locations -> “Update Language Files” (button)