Post

Self-service CI/CD pipeline for database deployments with Liquibase & Azure DevOps

Problem

I recently worked with a customer who struggled to promote database changes to production quickly and safely. Their changes often remained locked in manual processes, isolated from modern CI/CD practices.

Impact

This gap caused to:

  • Delays in delivering new features
  • Increased risk of human error in production deployments
  • A disconnect between dev and ops teams

Solution

Here’s a better way - something secure, automated, and developer-friendly. I developed an Azure DevOps CI/CD pipeline for database deployments that:

  • Validates database changes using Liquibase
  • Automates deployments to Dev, Staging, and Production
  • Enforces approval gates and rollback previews
  • Promotes changes safely to production
  • Requires no DBA intervention for routine changes

Continous Integration pipeline

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
πŸ“¦ CI Pipeline (validate code and package)
β”‚
β”œβ”€β”€ Validate Changelog
β”œβ”€β”€ Show Pending Changes
β”œβ”€β”€ Generate SQL Preview
β”œβ”€β”€ Generate Rollback SQL
β”œβ”€β”€ Deploy to Dev
β”œβ”€β”€ Tag Database
β”œβ”€β”€ Geberate Build Metadat
β”œβ”€β”€ Build Artifacts
└── Publish Artifact:
    β”œβ”€β”€ changelog.xml
    β”œβ”€β”€ /scripts/*.sql
    β”œβ”€β”€ update-preview.sql
    β”œβ”€β”€ rollback-preview.sql
    β”œβ”€β”€ version.txt
    └── liquibase.properties (optional)

Continuos Deploymeny pipeline

1
2
3
4
5
6
πŸš€ CD Pipeline (test code ande promote to prod)
β”‚
β”œβ”€β”€ Triggered by CI
β”œβ”€β”€ Downloads CI artifact
β”œβ”€β”€ Deploys to staging/prod using changelog
└── References version/tag for auditing

While continuous deployment (CD) offers significant advantages; speed, automation, and reduced manual effort - it may not be the ideal approach for all environments or organizations, especially when it comes to database deployments. ⚠️

Outcome

Implementing this solution allows:

  • Developers to commit database changes and see them deployed to Dev within minutes
  • Promotion to Production is fully automated but gated for approvals
  • Dev and Ops teams have visibility and traceability of every change
  • DBAs are no longer bottlenecks - we’re enablers of innovation
  • The business can respond faster to customer needs and market changes

Summary

By automating database deployments through a self-service CI/CD pipeline, developers are empowered to safely deliver changes without waiting on manual DBA intervention. This accelerates release cycles, reduces downtime, and improves team productivity. leading to faster time-to-market.

Faster time-to-market directly aligns with a stronger return on investment (ROI) for every development effort

This post is licensed under CC BY 4.0 by the author.