Refactor CI pipeline generation script
Created by: beyang
I found the gen-pipeline.go
CI script hard to understand and modify. So I refactored it to make clearer the high-level structure and different semantic groupings of CI steps. I think this will make it easier to reason about the build generation process as a whole and extend it to add additional steps (e.g., branches that trigger auto-deploys to dogfood instances, better support for patch releases, running more complete automation tests).