CI/CD pipeline to automate database deployments using Liquibase and GitLab

  1. AWS account
  2. GitLab account
  3. Amazon EC2 Instance configured as GitLab Runner
  4. Amazon Aurora RDS database (PostgreSQL)
  5. A database user that can connect to the Amazon Aurora RDS database and create/drop a table
  6. A local machine where the Git client is installed
  7. Docker
  8. AWS CLI
Architecture Diagram

Step 1: Use AWS Secrets Manager to store the database credentials.

Refer to the below link to create a secret in Secrets Manager:

Step 2: Create and Publish the Docker Image to AWS ECR

To create a Docker image:

Step 3: Create a GitLab project

Create a project in Gitlab

Step 4: Create SQL changesets

The SQL syntax which works with Liquibase is:




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store