Skill 2.3.9
Design and implement controls for deployment pipelines, including branching policies, triggers in approvals, authentication tables, and code owners
Key Concepts
Branch protection rules or rulesets on main require pull requests, a minimum number of approvals, passing status checks and up-to-date branches, and block force pushes. A CODEOWNERS file assigns owners to paths, such as the database team for /database/, and with the code-owner review requirement their approval is mandatory for changes to those files. Workflow triggers decide when pipelines run: pull_request for validation, push to main or workflow_dispatch for deployments, filtered by branches and paths.
Environments such as staging and production add protection rules: required reviewers who must approve before a deployment job starts, wait timers and branch restrictions. The authentication used by each environment should be scoped to it, for example a federated credential whose subject is the production environment, mapped to a database user with only the permissions deployments need. Deployment history and logs provide an audit trail.