29
Everything in Code Mack Hardy & Zoë Neill-St. Clair Nerds in residence at Affinity Bridge

Everything in code_slides

Embed Size (px)

DESCRIPTION

Mack Hardy presenting "Everything in Code" on the drupal development tools of Features, make files and drush. Presented at the 2nd Pacific Northwest Drupal Summit http://pnwdrupalsummit.org/2010/sessions/everything-code Mack is the founder of Affinity Bridge http://affinitybridge.com

Citation preview

Page 1: Everything in code_slides

Everything in Code

Mack Hardy & Zoë Neill-St. ClairNerds in residence at Affinity Bridge

Page 2: Everything in code_slides

WHATdo we mean by "everything"?

the things we do besides code: • the very act of downloading &

installing modules• all the configuration• post-go-live changes

source control}

Page 3: Everything in code_slides

WHYare people who have Everything In Code so

creepily happy?

config != content.

• source control!• diff!• repeat, repeat, repeat

  project handoff?  --> so easy.  time saved?  --> beer.

Page 4: Everything in code_slides

WHENis it a good idea?

• always.

Page 5: Everything in code_slides

HOWwhat do the kids in the audience

need to try this at home?

gitdrush

features } do it

Page 6: Everything in code_slides

HOWPeople, it's demo time.

make filesdrush makeupdating featurestesting } do it

Page 7: Everything in code_slides

Example of a make file

do it

Page 8: Everything in code_slides

Specific options

do it

Page 9: Everything in code_slides

drush make filename.make

do it

Page 10: Everything in code_slides

drush generate-makefile file.make

do it

HOWMake the Robots do it....

Page 11: Everything in code_slides

do it

FEATURIZE IT

Page 12: Everything in code_slides

do it

adding a feature

Page 13: Everything in code_slides

do it

the list of features

Page 14: Everything in code_slides

do itfeature details - from here we can re-roll the feature

Page 15: Everything in code_slides

do it

recreating a feature - components closeup

Page 16: Everything in code_slides

AND THENsome crazy person comes along and

changes some settings.

Page 17: Everything in code_slides

do it

the list of features, now with an override.

Page 18: Everything in code_slides

do it

looking at the details of a feature with overrides

Page 19: Everything in code_slides

do it

diffing the overrides.  a content type setting has been changed, and a block added to a context.

Page 20: Everything in code_slides

drush features-update my_sandwich

drush features-revert my_sandwich

do it

Page 21: Everything in code_slides

do it

AUTOMATED TESTING

CI JOE - http://github.com/defunkt/cijoe

Page 22: Everything in code_slides

do it

AUTOMATED TESTING

Post commit hooks to run simple tests 

Page 23: Everything in code_slides

do it

AUTOMATED TESTING

HUDSON -> SELENIUM -> "INTELLIGENCE"

HUDSONhttp://hudson-ci.org/

SELINIUMhttp://seleniumhq.org/

Page 24: Everything in code_slides

SOME THINGS ARE NOT (YET) EXPORTABLE

Page 25: Everything in code_slides

do it

SOME THINGS ARE NOT (YET) EXPORTABLE

update_N as a workaround 

• use .install file update hooks to adjust• features will preserve your custom code • don't cram in a million update_N tweaks

Page 26: Everything in code_slides

AUTOMATIONNow that we know it works....

Page 27: Everything in code_slides

HOWto ease your team into it

incrementalsmallsteps } start where

you are

Page 28: Everything in code_slides

ONWARDto Drupal 7!

what, are you scared? • all these tools work on D7 now• taxonomy is exportable• get Build Kit

Page 29: Everything in code_slides

Resources

Collaboration over Competitionhttp://affinitybridge.com

http://affinitybridge.com/category/topics/abridged

http://developmentseed.org/blog/2010/sep/30/features-and-exportables-drupal-7

http://developmentseed.org/blog/2010/sep/11/aegir-04-alpha-13-drush-make-support-allows-automatically-building-drupal-distribut

http://github.com/defunkt/cijoehttp://hudson-ci.org