The best way to download code Introducing Drush Make
Drush MakeDrush make is a Drush command thatcan create a ready-to-use Drupal site,pulling sources from variouslocations. In practical terms, thismeans that it is possible to distributea complicated Drupal distribution as asingle text ﬁle.
Drush Make ‣ A single .info ﬁle to describe modules, dependencies and patches ‣ A one-line command to download contributed and custom code: libraries, modules, themes, etc...
Applying patches; distro.make; Usage:; $ drush make distro.make [directory];api = 2core = 7.xprojects[drupal][type] = coreprojects[drupal][version] = "7.7"; Make system directories configurable to allow tests in profiles/[name]/modules; http://drupal.org/node/911354projects[drupal][patch] = http://drupal.org/files/issues/911354.43.patch; Missing drupal_alter() for text formats and filters; http://drupal.org/node/903730projects[drupal][patch] = http://drupal.org/files/issues/drupal.filter-al...
Applying patches$ drush make distro.make myprojectdrupal-7.7 downloaded.drupal patched with 911354.43.patch.drupal patched with drupal.filter-alter.82.patch.drupal patched with 995156-5_portable_taxonomy_permissions.patch.Generated PATCHES.txt file for drupal
Including an external makefile; distro.make;; $ drush make buildkit.make [directory];api = 2core = 7.x; Include Build Kit distro makefile via URLincludes = http://drupalcode.org/project/buildkit.git/../7.x-2.x:/distro.make
Your project: 2 make files‣ distro.make: Drupal core with possible core patches and a link to download myproject.make‣ myproject.make: includes BuildKit’s drupal-org.make plus project-speciﬁc modules and themes
Profiles: just like modules ‣ An .info ﬁle to specify installation dependencies ‣ An .install ﬁle to perform installation tasks and upgrades ‣ Fully customizable via .proﬁle ﬁles ‣ Can include makeﬁles and other stuff
What is a feature?‣ A collection of Drupal elements which taken together satisfy a certain use-case.‣ A modular piece of functionality for a Drupal site.‣ A way to export conﬁguration into PHP code, in the form of a module.‣ http://drupal.org/project/features
Building a CI Job‣ Create a job for testing your site‣ Triggered: ‣ Manually ‣ Scheduled ‣ By events (git push or other jobs)‣ A job can consist of ant scripts or simple shell commands (including drush)
Test #1: Makefile‣ Clone your code from git‣ Run drush make‣ Test that the proﬁle is downloaded‣ Test that modules are placed in the expected folders
Test #1: Shell commands‣ drush -y --pipe make distro.make‣ test -d proﬁles/myproject‣ test -d proﬁles/myproject/modules/contrib‣ test -d proﬁles/myproject/modules/custom‣ test -d proﬁles/myproject/modules/features
Test #2: Installation‣ Triggered by successful completion of Test #1‣ Run drush site-install: drush -y site-install ... myproject‣ Expect successful completion
Test #3: Configuration‣ Triggered by successful completion of Test #2‣ Relies on simpletest‣ Run drush test-run‣ Expect successful completion
Thank You.More on Code-Driven Developmenthttp://nuvole.org/bloghttp://nuvole.org/trainings