A ready-to-use CI/CD Pipeline for managing your database migrations with Atlas
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 .
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
Variable | Description | Required |
---|---|---|
DATABASE_URL | The database connection string | Yes |
DATABASE_DEV_URL | The database connection string used for calculating migrations differences | No |
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>
You can also use this pipeline programmatically:
import { migrate } from "jsr:@fluentci/atlas";
await migrate();