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

x/cicada/mod.ts

Write CI/CD pipelines using TypeScript
Latest
import * as cicada from "https://deno.land/x/cicada@v0.1.50/mod.ts";

Cicada

Write CI/CD pipelines in TypeScript

Get started with a simple pipeline

import { Job, Pipeline } from "https://deno.land/x/cicada/mod.ts";

const job = new Job({
  name: "Hello World",
  image: "node:18",
  steps: [{
    run: "echo Hello World",
  }],
});

export default new Pipeline([job]);

For more information, see the Cicada documentation.

Classes

A job is a lightweight container that executes code. Jobs can be configured with JobOptions. By default, all jobs in a pipeline run in parallel.

A pipeline is an array of jobs. Jobs are executed in parallel by default.

A secret is a secure variable, secrets are not cached whereas env variables are.

Interfaces

Options for a cached directory

The options for a job, including the name, base image, environment variables, secrets, folder cache, and steps.

The options for a pipeline, including the name and the conditions under which the pipeline should run.

The options to configure a shell

The options available in a step such as the name, the script to run, what directories to cache, and the secrets/env variables needed.

The options for configuring a pipeline's trigger event.

Type Aliases

A git branch represented as a string.

A directory to cache. This is an array of file/folder paths as strings or of CacheDirectoryOptions which allow for further configuration options

A file path represented as a string.

The shell to use for running a command. This can be a string or a shell options object.

A step in the job. A step can either be an object with a run property, a step function (which executed typescript), or a string command (which executes as bash).

A step function that can return void or a number and can be synchronous or asynchronous.

The trigger events which determines when a pipeline should run.