Skip to content

A ready-to-use CI/CD Pipeline for managing your database migrations with Atlas

License

Notifications You must be signed in to change notification settings

fluent-ci-templates/atlas-pipeline

Repository files navigation

Atlas Pipeline

fluentci pipeline deno compatibility dagger-min-version ci

A ready-to-use CI/CD Pipeline for managing your database migrations with Atlas

🚀 Usage

Run the following command in your project:

fluentci run atlas_pipeline

Or, if you want to use it as a template:

fluentci init -t atlas

This will create a .fluentci folder in your project.

Now you can run the pipeline with:

fluentci run .

🧩 Dagger Module

Use as a Dagger module:

dagger install github.com/fluent-ci-templates/atlas-pipeline@main

Call a function from the module:

dagger call migrate --src . --database-url env:DATABASE_URL

🛠️ Environment variables

Variable Description Required
DATABASE_URL The database connection string Yes
DATABASE_DEV_URL The database connection string used for calculating migrations differences No

✨ Jobs

Job Description
migrate Apply database migrations
dry_run Dry run migrations
dryRun(
  src: string | Directory,
  databaseUrl: string | Secret,
  databaseDevUrl?: string
): Promise<string>

migrate(
  src: string | Directory,
  databaseUrl: string | Secret,
  databaseDevUrl?: string
): Promise<string> 

👨‍💻 Programmatic usage

You can also use this pipeline programmatically:

import { migrate } from "jsr:@fluentci/atlas";

await migrate();