Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pushing Git Where It Doesn't Belong

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

Pushing Git Where It Doesn't Belong

In this talk, I present our approach to using Git in an environment where it conceptually does not belong: Business Operations.

As a custom CMS provider, we asked ourselves: could we somehow force communication officers, marketing gurus, bloggers and content editors to fall in line with our PHP coders and adhere to common version control principles? And if so, what would we gain? Would we find a stream of seamless pull requests, or a never-ending disaster of merge conflicts, blames, and end-user frustration?

I will share how we saw a bit of both, describe challenges of managing content like code, and our approaches for integrating Git with a powerful XML/XSLT templating engine.

But also, I hope to discuss the enormous gains that can be achieved when mapping DevOps processes onto the business world.

Avatar for Markus Latzel

Markus Latzel

November 05, 2016

Other Decks in Programming

Transcript

  1. This story is about: ▷ Coders and Clients working Together.

    ▷ On the same App. ▷ Without Disasters.
  2. The Content Editor All about “Copy”. Knows Wordpress. And Word.

    Expects everything to just work. “Like Apple!” Averaging 5 PPM (publishes-per-minute), all to the live site.
  3. The Product Manager Impossible to tap into every details of

    dev cycles and unable to balance change requests at a fine-grained level.
  4. Common Scenario Content Editors (Client) Edit pages. Preview. Publish. Edit

    some more. Preview. Publish. Edit. Edit. Publish. Preview. Preview. Edit. Publish. Preview. Edit. Edit. Publish. Edit. Edit. Publish. Preview. Edit. Developer Code. Test. Go-Live. Code. Test. Go-Live. Fix bug. Fix bug. Fix bug. Code. Test. Go-Live. Fix bug. Fix bug. Fix bug. Fix bug. Fix bug. Code. Test. Go-Live. Fix bug. Fix bug. Fix bug. Fix bug. Fix bug. Fix bug. Fix bug. Fix bug. Fix bug. Fix bug. Fix bug. …………. PM Project, project, project, project. Launch. Hand-over to Support.
  5. Developer Needs ▷ need all the functions available in Git

    ▷ conventions are easy ▷ my own sandbox ▷ automated tests ▷ short feedback cycle Client Needs ▷ prefer simple publish cycle ▷ extensible content structures ▷ concurrent contributors ▷ frequent content updates ▷ build out larger releases in parallel ▷ manual UAT tests / stage / preview
  6. ▷ Most CMS separate content from code ◦ PHP code

    ◦ HTML Templates ◦ Resource Files ◦ CDATA blobs in DB ▷ Counter-examples ◦ Statamic ◦ Gitbook
  7. Benefits of combined code & content ▷ Resolves Dependencies ▷

    Extensible Structures ▷ Crosses Barriers ▷ Git Version Control
  8. Continuous Integration ▷ UATs & Reviews ▷ Preview & Stage

    ▷ Go-Live Tests ▷ Compliance Tests
  9. ▷ Laravel Sites ◦ XML flat-file CMS ◦ Default XSL

    Templates ◦ Laravel Core ▷ WebPal Cloud Server ◦ Dev Platform ◦ Web UI & API ◦ Git
  10. Translating Client Processes “I need to make a quick edit

    to the contact-us page” > git pull origin master > edit > git commit -m “quick edit” -a contact-us.xml > git push origin master > webpal publish production
  11. Translating Client Processes “We are starting work on a new

    re-launch of our site and need a sandbox to work in” > webpal clone-site [email protected]:palominoinc/site-demo.git sandbox sandbox > git pull origin master sandbox > git branch re-launch sandbox > git checkout re-launch sandbox > edit edit edit
  12. Translating Client Processes “The developers need to test new feature

    A with our latest content” > webpal clone-site [email protected]:palominoinc/site-demo.git stage stage > git pull origin master stage > git merge origin feature-a stage > webpal run-tests stage > git push origin master
  13. Translating Client Processes “While we work on the new re-launch,

    we need a focus group to do UAT” > webpal clone-site [email protected]:palominoinc/site-demo.git uat uat > git pull origin master uat > webpal publish uat56 uat > webpal clone-db production uat56
  14. Keys for Success ▷ Control is good, but: ▷ Need

    to comply to conventions, at all times! ▷ Allow for novice team members
  15. > date Fri Nov 4 16:59:03 > git merge origin

    feature-a > webpal run-tests && webpal publish production testing… publishing… done. > exit