civic-commons / opencivic

A Drupal distro for app catalogs and hackathons
https://drupal.org/project/opencivic
16 stars 2 forks source link

Problems with Jenkins build #84

Open sheldonrampton opened 11 years ago

sheldonrampton commented 11 years ago

Aaron, I'm having problems with the Jenkins build of the Apps Catalog distro. It just isn't behaving the way the distro behaves on my laptop, and the problem isn't due to some difference between drush vs. Drupal's web interface. I know this because I've gone to a "components" approach to building the distro. Rather than building the site's content types, etc. when the install profile runs, I've created a module named "ocsetup" (for "Open Civic Setup") that lets me enable different functional components post-install using a webform that looks like this:

prepare_site

There is a function named ocsetup_form_submit() that does the main work of installing selected components of the website when I run the form. I discovered that to get this working properly, I had to put in some drupal_flush_all_caches() functions in various spots in the logic, particularly in places where the distro is enabling features with default content. For some reason, simply calling features_install_modules() doesn't actually make the site create nodes or taxonomy terms. I have to flush all caches in order to get the enabled module to actually be fully enabled. I found that drupal_flush_all_caches() works for this purpose, but cache_clear_all() does not.

The problem on the Jenkins instance is that when I try to use the "Open Civic Setup" form to enable components, it behaves the same way the distro was behaviing on my local site before I added the drupal_flush_all_caches() commands. In other words, I submit the form and it comes back with no error message, but it doesn't create the taxonomy terms or nodes that I need created. This in turn messes up other aspects of the site setup.

I've found by experience that if I manually flush all caches using the admin menu, this seems to clear the problem, and adding subsequent components via the Open Civic Setup form works as expected.

I'm also seeing error messages in Jenkins saying that the Apps Catalog site builds are failing, even though they appear to have completed each time I visit http://apps-cat.nuamsdev.com/ after pushing commits to github. (I see that Jenkins is still not using the version of Drupal 7 that is actually specified in the install profile, which kind of sucks because I added a patch to core to fix an error message.)

sheldonrampton commented 11 years ago

This is a duplicate of https://github.com/civic-commons/opencivic/issues/63