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

I deploy on Fridays (and maybe you should too) ...

I deploy on Fridays (and maybe you should too) (ConFoo 2019)

Have you ever heard someone say “Don’t deploy on Friday”? I used to say that too!
Join me as I'll tell you about my experience. Using examples from my work on multiple real world projects, I’ll discuss resilience and operability, deployment strategies, pipelines and continuous testing. Discover the details of trunk based development, feature toggles, pair programming and other best practices and gain the confidence to deploy any day of the week!

Michiel Rook

March 13, 2019
Tweet

More Decks by Michiel Rook

Other Decks in Programming

Transcript

  1. @michieltcs "This pull request affects 31 files...
 could be a

    lot of conflicts if we don't merge it soon"
  2. @michieltcs CONTINUOUS TESTING UNIT TESTS ACCEPTANCE TESTS E2E
 TESTS Cost

    Speed Exploratory
 testing & user
 feedback Monitoring
 & alerting INTEGRATION TESTS
  3. @michieltcs pipeline {
 stages {
 stage('Run tests') {
 sh "gradle

    check"
 }
 
 stage('Build docker image') {
 sh "docker build -t jobservice:${env.BUILD_NUMBER} ."
 sh "docker push jobservice:${env.BUILD_NUMBER}"
 }
 
 stage('Deploy staging') {
 sh "ansible-playbook -e BUILD=${env.BUILD_NUMBER}
 -i staging deploy.yml"
 }
 
 stage('Deploy production') {
 sh "ansible-playbook -e BUILD=${env.BUILD_NUMBER}
 -i prod deploy.yml"
 }
 }
 PIPELINE AS CODE image: registry.local/runner:latest
 
 stages:
 - test
 - images
 - deploy
 
 phpunit:
 stage: test
 script:
 - bin/phpunit
 
 images:
 stage: images
 script:
 - make images publish
 only:
 - master
 
 deploy:
 stage: deploy
 script:
 - make deploy
 only:
 - master