We currently have the following setup:
Push to the dev branch, deploy to development environment
Push to test branch, deploy to the test environment
Push to the master branch, deploy to staging, then to production
This is a good setup for trunk based development (rather than gitflow). I’m not a big fan of branch=environment for dev & test though. As a pattern it’s convenient, however it’s heavily reliant to force pushes and can easily trick people into thinking it’s an integration branch, rather than a transient state of what’s currently deployed to that environment.
I would much prefer a separate UI that allows for “deploy x artifact from y repo to z environment”. We are planning on building this ourselves at some point and triggering buildkite from it for manually selected deployments. Deploying an artifact from feature-branch-a to development would be the same as git push feature-branch-a:dev --force
. It would be nice if buildkite provided this UI for us, and allowed us to hook in our artifact links & repos to it.