2

When using civicrm-buildkit, it automatically configures an extension directory with something like:

/home/jon/local/civicrm-buildkit/build/d46/sites/default/ext

However, there are no extensions in that directory, though there are clearly extensions installed in the built site. Moreover, extensions added to the extensions directory don't appear. What's the preferred method to get extensions installed on a site built with civicrm-buildkit?

2 Answers 2

3

As a bit of background, it may help to check out "What's a build?" and "What are the basic build techniques?".

There are a few directions one can take on that topic:

  • Install an extension once, locally, for a single build.
  • Modify the build-document of an existing build-type so that the extension will always be installed in the future. (For example, if you modify the build-document for wp-demo, then the extension would be installed on wp45.demo.civicrm.org, wp46.demo.civicrm.org, etc. every night when the demo sites are rebuilt.)
  • Create a custom build-type with a custom build-document using your own curated list of extensions/modules.

Installing once is easiest -- you can use basically any extension-management practice that you'd use normally (with or without civibuild). The web-based manager or drush cvapi will be fine.

To modify a build-document, you would create or edit files in app/config -- you'll need to create steps for download and install. For example, in drupal-demo:

Digging into those files, you can see how it handles the CiviVolunteer extension. (Search for "volunteer".)

To create a new build-document, you should copy one of the existing build-types. The best starting points are (IMHO) drupal-demo (which uses drush with drush-make), wp-demo (which uses wp-cli and git), and wmff (which uses git submodules).

When editing a build-document, the development-feedback-loop (edit=>run=>validate=>repeat) can be a bit slow. To mitigate that, buildkit includes caches and nuanced rebuild commands.

1

If your aim it to automatically install an extension, you will need to change a few files. I did it with Tim last time I was in SF for civisualize, search for "civisualize" to find them.

If the aim is simply to add an extension, I simply symlink it into the ext folder and run:

drush -y cvapi extension.install key=org.whatever.yourext debug=1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.