Deployment Anti-Patterns

Deployment failures are rarely caused by a single bad commit. They are usually systemic: hidden coupling, manual steps, and inconsistent artifacts. This post catalogs anti-patterns that advanced teams

Introduction#

Deployment failures are rarely caused by a single bad commit. They are usually systemic: hidden coupling, manual steps, and inconsistent artifacts. This post catalogs anti-patterns that advanced teams should eliminate to keep deployment throughput high and risk low.

Anti-Pattern 1: Mutable Artifacts#

Building a new artifact for each environment invalidates test results. A single immutable artifact should be promoted through environments with only configuration changes applied at runtime.

Anti-Pattern 2: SSH-Based Manual Deployments#

Manual shell access breaks auditability and makes rollbacks unpredictable. Replace it with declarative deployment tools and tracked releases.

Anti-Pattern 3: Environment-Specific Branches#

Branch-per-environment introduces merge conflicts and hidden drift. Use a single mainline and environment-specific configuration managed via sealed secrets and runtime settings.

Anti-Pattern 4: Configuration in Code#

Hard-coded environment values lead to repeated redeployments and secrets exposure. Configuration should be externalized and injected at deployment time.

1
2
3
4
5
6
7
public sealed class DbOptions
{
    public string ConnectionString { get; init; } = string.Empty;
}

builder.Services.Configure<DbOptions>(
    builder.Configuration.GetSection("Database"));

The configuration values can now come from environment variables or a secret manager, not from a code change.

Anti-Pattern 5: Big-Bang Releases#

Large releases reduce observability and make rollbacks dangerous. Progressive delivery, canary releases, and feature flags reduce impact radius.

Anti-Pattern 6: Ignoring Runtime Signals#

Deployments should be gated on runtime telemetry. A release pipeline that ignores error rates and latency is equivalent to flying blind.

Replacement Patterns#

  • Immutable artifacts with promotion-based deployment.
  • Infrastructure as Code for environments.
  • Progressive delivery with automated health checks.
  • Audit trails for every release action.

Summary#

Eliminating deployment anti-patterns is mostly about consistency: build once, deploy consistently, and drive decisions using runtime signals. The payoff is lower change failure rate and faster incident recovery.

Contents