Continuous Integration and Deployment
Automation
"Everything that can be automated should be automated"
Compare and contrast with "We value people over tools"
Automation always comes with costs
"Continuous" (on every relevant change)…
Integration — build and test
Delivery — system test in "native" environment
Deployment — make new release available
Systems Are Not Just Code
Assets
Databases
Build infrastructure
Configuration
Tests
Case Study: Enabling Rust Compiler Feature
Finish up with old Issue
Literally change a symbol from
Warn
toForbid
in the compiler source — about a weekMake the change, watch the compiler fail to compile during CI
Fix the problems introduced by the change iteratively
- Relying on CI too slow, so got local build / test infrastructure working
Pull request edited many times
"Crater" run to check for problems across many, many open source Rust projects: found two significant ones that were quickly fixed
Finally, pull request accepted: success
Feature becomes part of "nightly" (dev) release, later stable release
Happens literally dozens of times a week on this project
CI/CD Using Cloud Containers
Typically Github Actions + Docker on Github (Travis CI etc available)
Before each release, system is automatically built and "realistically" tested
For services, running service is auto-updated once testing is complete
Software can be auto-deployed across many systems using tools like
Puppet
orChef
First Steps: Github Actions
Recommend the first two Github "Learning Labs": "Github Actions: Hello World" and "Github Actions: Continuous Integration". Both are quite good.