Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fluent-ci-templates/prisma-pipeline
A ready-to-use CI/CD Pipeline for managing your database migrations with Prisma Migrate
https://github.com/fluent-ci-templates/prisma-pipeline
cicd deno devops pipeline prisma typescript
Last synced: about 1 month ago
JSON representation
A ready-to-use CI/CD Pipeline for managing your database migrations with Prisma Migrate
- Host: GitHub
- URL: https://github.com/fluent-ci-templates/prisma-pipeline
- Owner: fluent-ci-templates
- License: mit
- Created: 2023-09-01T10:55:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-18T20:19:45.000Z (6 months ago)
- Last Synced: 2024-07-24T01:02:17.308Z (5 months ago)
- Topics: cicd, deno, devops, pipeline, prisma, typescript
- Language: TypeScript
- Homepage:
- Size: 176 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Prisma Pipeline
[![fluentci pipeline](https://shield.fluentci.io/x/prisma_pipeline)](https://pkg.fluentci.io/prisma_pipeline)
![deno compatibility](https://shield.deno.dev/deno/^1.42)
[![dagger-min-version](https://shield.fluentci.io/dagger/v0.11.7)](https://dagger.io)
[![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/prisma-pipeline)](https://codecov.io/gh/fluent-ci-templates/prisma-pipeline)A ready-to-use CI/CD Pipeline for managing your database migrations with [Prisma Migrate](https://www.prisma.io/docs/guides/migrate)
## 🚀 Usage
Run the following command in your project:
```bash
fluentci run prisma_pipeline
```Or, if you want to use it as a template:
```bash
fluentci init -t prisma
```This will create a `.fluentci` folder in your project.
Now you can run the pipeline with:
```bash
fluentci run .
```## Dagger Module
Use as a [Dagger](https://dagger.io) Module:
```bash
dagger mod install github.com/fluent-ci-templates/prisma-pipeline@mod
```## Environment variables
| Variable | Description |
| ---------------- | ------------------------------ |
| DATABASE_URL | The database connection string |## Jobs
| Job | Description |
| --------- | ------------------------- |
| validate | Validate prisma schema |
| deploy | Deploy all migrations |
| push | Apply schema changes |```typescript
validate(
src: string | Directory,
databaseUrl: string | Secret
): Promisedeploy(
src: string | Directory,
databaseUrl: string | Secret
): Promisepush(
src: string | Directory,
databaseUrl: string | Secret
): Promise
```## Programmatic usage
You can also use this pipeline programmatically:
```ts
import { deploy } from "jsr:@fluentci/prisma";await deploy(".", Deno.env.get("DATABASE_URL")!);
```Or:
```ts
import { validate, push } from "jsr:@fluentci/prisma";// validate prisma schema and apply schema changes
await validate(".", Deno.env.get("DATABASE_URL")!);
await push(".", Deno.env.get("DATABASE_URL")!);
```