Continuous Delivery
Tools - Workflows - Culture
Agenda
- Introduction
- Tools
- Workflow(s)
- Culture
Continuous Delivery - Why?
Tools - Workflow(s) - Culture
Development Environment
- VirtualBox
- Vagrant
- Proper IDE
Continuous Integration
- Jenkins
- Pipeline Plugin
- Docker for ephemeral build containers
Pipeline Example
node {
stage 'Clone from Git'
git url: 'GIT_URL'
stage 'Build'
sh 'composer install'
sh 'grunt'
stage 'Unit Tests'
sh 'phpunit --bootstrap src/autoload.php tests/unit'
stage 'Deploy to Test'
sh './flow surf:deploy project'
}
Artifact Storage
- Artifactory
- JS / CSS builds
- PHP packages (composer)
- Docker Images
Delivery (a.k.a. Deployment)
Environments
- Integration, Staging, Production
- Use immutable infrastructure
- If you really need it, use either
- But really: use immutable infrastructure
Development Workflow
- Develop locally
- Pair Programming
- Code Review
Version Control
- Short living feature branches
- Develop branches are evil
- Regularly integrate into master
- Merge Request (Gitlab)
- Problem: Deliver tasks independently
Merge Request Workflow
- Create a feature branch (PRJ-123)
- Implement your feature
- Push branch to Gitlab server
- Create merge request
- Assign it to your colleague
- Merge or decline
Feedback Loops
- Establish a Continuous Delivery pipeline
- Separate stages from fast to slow(er)
- Run tests locally (before push)
- Build on CI server
- Run Unit Tests
- Run Integration Tests
- ...
- Deploy to Staging
- Deploy to Production
Do NOT program on the CI Server
- Use pipeline plugin
- Make build pipeline part of project
- Write a (simple) script
- Version it
Do not run jobs on Jenkins Master
- Use agents
- Run agents in short living (ephemeral) containers
- Separate build environments
- Provide greenfield to each build
Build once, use everywhere
- Make builds traceable
- Do not build things more than once
- Build an re-use
Feedback
- Personal Feedback
- Pairing - close session with feedback
- Retrospectives
- Customer feedback
- User feedback
- Automated Feedback
KISS
- Keep It Simple Stupid
- Strive for understanding
- Make whole team understand the toolchain
- Motivate by simplicity not by complexity
Prodcut Thinking
over Project Thinking
- Cross-functional teams
- Create value for customer, not just finish projects
- Support and re-think supporting business process
- Take responsibility for success of product
Strive for Agility
- Individuals and interactions >> processes and tools
- Stable teams
- Iteratively develop and track processes
- Working software >> comprehensive documentation
- Convention over documentation
- Frameworks, well-known software and tools
Strive for Agility
- Customer collaboration >> contract negotiation
- Include customer in planning and review (and retrospectives?)
- Provide access to JIRA, test system, monitoring, test results
- Respond to change >> follow a plan
- Small batches, iterations
- Get changes on the road quickly
- Incorporate customer and user feedback
TODOs
- Add goals for Dev Environment
- Be as close to production as possible
- Add example for Behat tests
- Add slide about traceability
- Provide images for collaboration models
- cross-functional teams
- devops teams
- Add some information about (Jenkins) notifications
- Add blue-green deployment
- Add further ideas for imm. infrastrct
- Refine image for CD
- Refine tools overview image
- RFT idea: show workflow based on "real world example"
Continuous DeliveryTools - Workflows - Culture