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

I deploy on Fridays (and maybe you should too)

Michiel Rook
February 22, 2019

I deploy on Fridays (and maybe you should too)

Have you ever heard someone say "Don’t deploy on Friday"? I used to say that too! Learn about resilience and operability, deployments, pipelines and continuous testing. Discover trunk based development, pair programming and best practices, and gain the confidence to deploy any day of the week!

Michiel Rook

February 22, 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