Someone wrote the shop's image pipeline in a hurry. Read ci.yml: the publish job builds shop:latest and pushes it straight away, from every branch. Then the test job builds a second image and tests that one. What's tested isn't what ships, and a broken branch can overwrite latest. It doesn't even work yet: the registry password was never stored. It's in ~/registry-password.txt.
Make the pipeline:
- Build one image, tagged with its commit.
- Test that image, and push it only if the tests pass.
- Push only from
main.
Sam's branch bigger-dragons passes its tests. It needs your workflow merged in before it shows anything.
Everything you need is in Chapters 1 to 5.
Objectives
- Push main's image.
- Test before you push.
- Build once.
- Only main ships.