Only Path to Any Environment
Definition
The deployment pipeline is the single, standardized path for all changes to reach any environment—development, testing, staging, or production. No manual deployments, no side channels, no “quick fixes” bypassing the pipeline. If it’s not deployed through the pipeline, it doesn’t get deployed.
Key principles:
- Single path: All deployments flow through the same pipeline
- No exceptions: Even hotfixes and rollbacks go through the pipeline
- Automated: Deployment is triggered automatically after pipeline validation
- Auditable: Every deployment is tracked and traceable
- Consistent: The same process deploys to all environments
Why This Matters
Multiple Deployment Paths Create Serious Risks
- Quality issues: Bypassing the pipeline bypasses quality checks
- Configuration drift: Manual deployments create inconsistencies between environments
- Security vulnerabilities: Undocumented changes escape security review
- Debugging nightmares: “What’s actually running in production?”
- Compliance violations: Audit trails break when changes bypass the pipeline
- Lost confidence: Teams lose trust in the pipeline and resort to manual interventions
A Single Deployment Path Provides
- Reliability: Every deployment is validated the same way
- Traceability: Clear audit trail from commit to production
- Consistency: Environments stay in sync
- Speed: Automated deployments are faster than manual
- Safety: Quality gates are never bypassed
- Confidence: Teams trust that production matches what was tested
- Recovery: Rollbacks are as reliable as forward deployments
What “Single Path” Means
One Merge Pattern for All Changes
Direct Trunk Integration: all work integrates directly to trunk using the same process.
Anti-pattern Examples
- Integration Branch
This creates TWO merge structures instead of one:
- When trunk changes → merge to integration branch immediately
- When features change → merge to integration branch at least daily
The integration branch lives a parallel life to the trunk, acting as a temporary container for partially finished features. This attempts to “mimic” feature toggles to keep inactive features out of production.
Why This Violates Single-Path
- Creates multiple merge patterns (trunk→integration AND features→integration)
- Integration branch becomes a second “trunk” with different rules
- Adds complexity: “Is this change ready for integration or trunk?”
- Defeats the purpose: Use actual feature flags instead of mimicking them with branches
- Accumulates “given-up” features that stay unfinished forever
- Delays true integration: Features are integrated to integration branch but not to trunk
- GitFlow (Multiple Long-Lived Branches)
GitFlow creates MULTIPLE merge patterns depending on change type:
- Features: feature → develop → release → master
- Hotfixes: hotfix → master AND hotfix → develop
- Releases: develop → release → master
Why This Violates Single-Path
- Different types of changes follow different paths to production
- Multiple long-lived branches (master, develop, release) create merge complexity
- Hotfixes have a different path than features (bypassing develop)
- Release branches delay integration and create batch deployments
- Merge conflicts multiply across multiple integration points
- Violates continuous integration principle (changes don’t integrate daily to trunk)
- Forces “release” to be a special event rather than continuous deployment
The Correct Approach: Trunk-Based Development with Integration Patterns
Option 1: Feature Flags
For incomplete features that need to be hidden:
Option 2: Branch by Abstraction
For behavior changes:
Option 3: Connect Tests Last
For new features:
Option 4: Dark Launch
For new API routes:
All code integrates to trunk using ONE merge pattern. Incomplete features are managed through these patterns, not through separate integration branches.
For guidance on when to use each pattern, see Feature Flags.
All Environments Use the Same Pipeline
The same pipeline deploys to every environment, including hotfixes and rollbacks:
Anti-Patterns to Avoid
- SSH into server and copy files
- Upload through FTP/SFTP
- Run scripts directly on production servers
- Use separate “emergency deployment” process
- Manual database changes in production
- Different deployment processes for different environments
Example Implementations
Anti-Pattern: Multiple Deployment Paths
Problem: No consistency, no audit trail, no validation. Production becomes a mystery box.
Good Pattern: Single Pipeline for Everything
Benefit: Every deployment—normal, hotfix, or rollback—uses this pipeline. Consistent, validated, traceable.
Common Patterns
Environment Promotion
Deploy the same artifact through progressive environments:
Fast-Track Pipeline for Emergencies
Keep the same path, but optimize for speed when needed:
Rollback via Pipeline
Rollbacks should be faster than forward deployments:
Database Migrations
All database changes flow through the pipeline:
Database Change Requirements
- Backward-compatible (new code works with old schema)
- Forward-deployable (migrations are additive)
- Automated (migrations run in pipeline)
This allows rolling back application code without rolling back schema.
FAQ
What if the pipeline is broken and we need to deploy a critical fix?
Fix the pipeline first. If your pipeline is so fragile that it can’t deploy critical fixes, that’s a pipeline problem, not a process problem. Invest in pipeline reliability.
What about emergency hotfixes that can’t wait for the full pipeline?
The pipeline should be fast enough to handle emergencies. If it’s not, optimize the pipeline. A “fast-track” mode that skips some tests is acceptable (see Common Patterns above), but it must still be the same pipeline, not a separate manual process.
Can we manually patch production “just this once”?
No. “Just this once” becomes “just this once again.” Manual production changes always create problems. Commit the fix, push through the pipeline, deploy.
What if deploying through the pipeline takes too long?
Optimize your pipeline:
- Parallelize tests
- Use faster test environments
- Implement progressive deployment (canary, blue-green)
- Cache dependencies
- Optimize build times
A well-optimized pipeline should deploy to production in under 30 minutes.
Can operators make manual changes for maintenance?
Infrastructure maintenance (patching servers, scaling resources) is separate from application deployment. However, application deployment must still only happen through the pipeline.
Health Metrics
- Pipeline deployment rate: Should be 100% (all deployments go through pipeline)
- Manual override rate: Should be 0%
- Hotfix pipeline time: Should be < 30 minutes
- Rollback success rate: Should be > 99%
- Deployment frequency: Should increase over time as confidence grows
Additional Resources
- Continuous Delivery: The Deployment Pipeline
- Accelerate: Technical Practices - Nicole Forsgren, Jez Humble, Gene Kim
- Dave Farley: Deployment Strategies
- Jez Humble: Why We Need Deployment Pipelines
- Site Reliability Engineering: Release Engineering