How do you give every PR a preview environment?
IntermediateProductionGovernance, migration, automation and cost
Answer
A workflow on pull_request builds an image, deploys it to a namespaced environment (for example pr-482.preview.example.com) via Helm or Argo CD ApplicationSet with the PR generator, comments the URL, and tears down on closed. Use quotas and a TTL job to avoid orphaned previews.
More on Governance, migration, automation and cost
How do you migrate 200 repos from Bitbucket or GitLab to GitHub with minimal disruption?IntermediateWhat does a migration from SVN (or a legacy monolith repo) to Git need beyond the conversion?AdvancedWhat standard files should every repo have?BeginnerHow do you manage GitHub organisation settings as code?IntermediateWhat is InnerSource and how does Git workflow support it?IntermediateWhen do you use DCO versus CLA?Beginner