doc.pipelight/index.md

4.4 KiB

title layout hero
Home home
name image text tagline actions
Pipelight
src alt
/images/pipelight.png pipelight_logo
Automation pipelines but easier. Elevate your bash scripts to generic, debuggable and auto-triggered pipelines.
theme text link
brand Get Started /introduction/install
theme text link
alt Why pipelight? /introduction/description

Command-line Interface

Stay in the comfort of your terminal

Write readable and reusable blocks.

Your shell commands..

#simple_example.sh
## List files
ls;
## Get working directory
pwd;

{{ tailwind.lg ? '⇢' : '⇣' }}

..wrapped into Typescript..

{
  name: "simple_example",
  steps: [
    {
      name: "list files",
      commands: ["ls"]
    },
    {
      name: "get directory",
      commands: ["pwd"]
    }
  ]
}

{{ tailwind.lg ? '⇢' : '⇣' }}

..boosted with syntaxic sugar

pipeline("simple_example", () => [
  step("list files",() => ["ls"]),
  step("get directory", () => ["pwd"])
]);

Code in your config file.

import { makeDeployPipe } from "./template/deploy.ts";

const env = await load({ envPath: `./.env.production` });

const params = {
  remote: {
    domain: "myserver.com",
    path: "/remote/directory"
  },
  local: {
    path: "/my/build/directory"
  }
};

const deploy_pip = makeDeployPipe(params, env);

export default {
  pipelines: [deploy_pipe]
};

Define complex operations with less code.

with the Pipelight Helpers

pipeline("docker_deploy", () => [
  step("build images and run containers", () => [
    ...docker.images.create(),
    ...docker.containers.create()
  ])
]);

Troubleshoot the pipe in a breeze.

Get aggressively verbose

Gather every process outputs.

Trigger pipelines automatically.

On file change

// When saving/deleting/modifying a file
// on branch dev and feature/<something>
{
    actions: ["watch"],
    branches: ["dev", "feature/*"]
}
# Using vim (saves changes)
:w

On git hooks

// When on tag v<something> and pushing to remote
{
    actions: ["pre-push"],
    tags: ["v*"]
}
git tag -a v0.1
#or
git checkout v0.1
git push

Write small pipelines for atomic tasks.

Use minimal configuration formats

Old-school flavors

[[pipelines]]
name =  "simple_example"

[[pipelines.steps]]
name = "list directory"
commands = ["ls"]

[[pipelines.steps]]
name = "get working directory"
commands = ["pwd"]
pipelines:
  - name: simple_example
    steps:
      - name: list directory
        commands:
          - ls
      - name: get working directory
        commands:
          - pwd

tl;dr

Rust based.

Made with passion

for conscientious programmers.

♥️