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

Continuous Integration with Jenkins, Grails, an...

mjhugo
June 12, 2012

Continuous Integration with Jenkins, Grails, and Git

mjhugo

June 12, 2012
Tweet

More Decks by mjhugo

Other Decks in Technology

Transcript

  1. ( )

  2. field value name “mike hugo” company “Entagen” bio “lorem ipsum

    dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor println ''' awesome code ''' push
  3. field value name “mike hugo” company “Entagen” bio “lorem ipsum

    dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor println ''' awesome code ''' push poll for change every X minutes
  4. field value name “mike hugo” company “Entagen” bio “lorem ipsum

    dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor field value name “mike hugo” company “Entagen” bio “lorem ipsum dolor println ''' awesome code ''' # change found git clone ... grails clean grails test-app grails war # save artifacts push
  5. Even Better Process •Feature Branch •Code •Commit/Push •Automated Build (per

    branch!!) •Pull Request •Merge into Master •Automated Build •Deploy to Prod
  6. Even Better Process •Feature Branch •Code •Commit/Push •Automated Build (per

    branch!!) •Pull Request •Merge into Master •Automated Build •Deploy to Prod Now that would be awesome
  7. #!/usr/bin/env bash git checkout master git fetch --all -p git

    pull echo about to delete: git branch -r --merged master | sed 's/ *origin\///' | egrep -v '(master$| ^release/)' echo actually deleting: git branch -r --merged master | sed 's/ *origin\///' | egrep -v '(master$| ^release/)' | xargs -I% git push origin :%
  8. Master Branch Build Build Per Branch Project Feature Branches Master

    foo foo Branch Build merge Purge Merged delete
  9. Build.gradle sk syncWithRepo(dependsOn: 'classes', type: Java main = 'com.entagen.jenkins.Main' classpath

    = sourceSets.main.runtimeClasspath // pass through specified system properties to ['help', 'jenkinsUrl', 'jenkinsUser', ...].eac if (System.getProperty(it)) systemProperty it, System.getProperty(it }
  10. Master Branch Build foo Branch Build bar Branch Build Grails

    1.3.7 Grails 2.0.3 Grails 2.1.0.RC2 Build Tool Versions
  11. Master Branch Build foo Branch Build bar Branch Build Grails

    1.3.7 Grails 2.0.3 Grails 2.1.0.RC2 Build Tool Versions
  12. Our Process • Feature Branch • Code • Commit/Push •

    Automated Build (per branch) •Automated Deploy (per branch) • Pull Request • Merge into Master • Automated Build • Deploy to Prod
  13. Our Process • Feature Branch • Code • Commit/Push •

    Automated Build (per branch) •Automated Deploy (per branch) • Pull Request • Merge into Master • Automated Build • Deploy to Prod Coming Soon!
  14. Lightweight • Feature Branch • Code • Commit/Push • Automated

    Build (per branch) • Automated Deploy (per branch) • Pull Request • Merge into Master • Automated Build • Deploy to Prod