Manning Twitch stream Jan 12, 2022
Learn how to automate one of the two pieces of Continuous Delivery: always keeping your codebase in a releasable state. We’ll use GitHub actions to explore the lifecycle of a change, discover all the places where bugs can squirm their way in, and learn the best times to run your pipelines for the most effective bug-catching!
Overall goal: Always be in a releasable state (one of the 2 pieces of CD)
Go from a repo with no automation to a repo with:
- PR based automation
- Post-merge PR based automation
- Periodic automation
Setup automation to:
- Run unit tests
Demonstrate why you need:
- PR based automation - show getting the repo into a broken state
- Post-merge based - show example of conflicting changes making main broken
- Periodic automation - can highlight conflicting changes and catch flakes
What's still missing? (could explore if time)
- Demonstrating flakes being caught
- Build image & run system test
- Release automation (e.g. tag based)
- Linting
- Repo with a service that gets rates, includes dockerfile
- Show a PR that breaks the repo (1_bad_pr)
- Add github action to run tests (2_add_pr_tests)
- Show how this fixes the original PR problem
- Show 2 conflicting PRs and how a bug isn’t caught (3_bad_pr_1, 3_bad_pr_2)
- Add periodic action to highlight issue (4_periodic)
- Undo conflicting PRs
- Open PRs again
- Show requiring branch to be up to date (docs)
- Explain downsides (many PRs = many updates)
- Undo requiring branch to be up to date
- Show post merge action (5_post_merge)
- Describe merge queues / merge trains (GitHub merge queue docs)
docker build --tag coin-rates .
docker run -p 80:5000 coin-rates
Accessing in browser: