Giter VIP home page Giter VIP logo

pipelight's Introduction

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 [email protected].

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

pipelight's People

Contributors

pipelight avatar kogeletey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.