Skip to main content
Deno 2 is finally here 🎉️
Learn more

Deno Pipeline

deno module deno compatibility

A ready-to-use GitLab CI Pipeline and Jobs for your Deno projects.

🚀 Usage

Quick start:

import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts";

const { pipeline } = GitLab;

pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml

Or, if you want to use the predefined jobs:

import { GitlabCI } from "https://deno.land/x/fluent_gitlab_ci/mod.ts";
import { GitLab } from "https://deno.land/x/deno_pipeline/mod.ts";

const { fmt, lint, test } = GitLab;

const const pipeline = new GitlabCI()
  .image("denoland/deno:alpine")
  .addJob("fmt", fmt)
  .addJob("lint", lint)
  .addJob("test", test);

pipeline.write(); // Write the pipeline to the file .gitlab-ci.yml

It will generate the following .gitlab-ci.yml file:

# Do not edit this file directly. It is generated by Fluent GitLab CI

image: denoland/deno:alpine

fmt:
  image: denoland/deno:alpine
  script:
    - deno fmt --check

lint:
  image: denoland/deno:alpine
  script:
    - deno lint

test:
  image: denoland/deno:alpine
  script:
    - deno test

🧪 Advanced Usage

This package also provides a ready-to-use pipeline for Dagger:

import Client, { connect } from "@dagger.io/dagger";
import { Dagger } from "https://deno.land/x/deno_pipeline/mod.ts";

const { fmt, lint, test } = Dagger;

function pipeline(src = ".") {
  connect(async (client: Client) => {
    await fmt(client, src);
    await lint(client, src);
    await test(client, src);
  });
}

pipeline();