Skip to content

Tiny automation pipelines. Bring CI/CD to the smallest projects. Self-hosted, Lightweight, CLI only.

License

Notifications You must be signed in to change notification settings

kogeletey/pipelight

 
 

Repository files navigation

pipelight_logo

Pipelight - Tiny automation pipelines.

You should checkout the Documentation for a much friendly approach and a deeper understanding.

Get help (fast)!

Pipelight is a young software and has become stable pretty recently. If you encouter a bug or whatever difficulty, please open an issue or send a message on discord or on telegram at @Areskul or send a mail at areskul@areskul.com.

A lightweight software

Pipelight is a 13Mb binary, to be used in the terminal.

It aims to automate boring and repetitive tasks.

You fold your bash commands into a Pipeline{ Step{ Command }} written in Typescript (Yaml or Toml), and it executes the pipeline on some events.

Define pipelines with a programming language

Create a pipelight.ts file on your project root directory. Then use and combine your favorite syntax flavors.

Use a verbose and declarative syntax. (Objects API)

const my_pipeline = {
  name: "build_my_website",
  steps: [
    {
      name: "clean directory",
      commands: ["rm -rf ./dist"],
    },
    {
      name: "build",
      commands: ["pnpm install", "pnpm lint", "pnpm build"],
    },
  ],
};

Use the provided sweet shorthands, or make your owns. (Helpers API)

const my_pipeline = pipeline("build website", () => [
  step("clean directory", () => [`rm -rf ${build_dir}`]),
  step("build", () => ["pnpm install", "pnpm lint", "pnpm build"]),
  step("send to host", () => [`scp -r ${build_dir}`]),
  step("do stuffs on host", () => [
    ssh("host", () => ["systemctl restart nginx"]),
  ]),
]);

Automatic triggers

Add automatic triggers to your pipeline. Run tests on file change. Push to production on new tag...

# enable watcher and git hooks.
pipelight enable git-hooks
pipelight enable watcher
pipeline.add_trigger({
  tags: ["v*"],
  actions: ["pre-commit", "pre-push"],
});

Pretty and Verbose logs

pipelight logs

pretty logs

pipelight logs -vvvv

pretty logs

Try it quick (ArchLinux)

Install

paru -S pipelight-git

Ensure the default configuration file.

pipelight init

Will generate this default typescript configuration file.

// pipelight.ts
import type { Pipeline } from "https://deno.land/x/pipelight/mod.ts";
const my_pipeline: Pipeline = {
  name: "example",
  steps: [
    {
      name: "list directory",
      commands: ["ls"],
    },
    {
      name: "get present working directory",
      commands: ["pwd"],
    },
  ],
};
export default {
  pipelines: [my_pipeline],
};

Try the harmless default pipeline

pipelight run

Explore logs

pipelight logs -vvvv

Licensed under GNU GPLv2 Copyright (C) 2023 Areskul

About

Tiny automation pipelines. Bring CI/CD to the smallest projects. Self-hosted, Lightweight, CLI only.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 95.5%
  • TypeScript 3.5%
  • Other 1.0%