Pipelight Helpers

Self-hosted automation pipelines. Helpers Documentation.

Overview

Helpers are functions that take an Object as argument and generate executable strings for pipelight to process. They are presented from the lowest to the highest level of abstraction they provide.

Common helpers

Define pipelines quicker.

// define a pipeline
pipeline("deploy", () => [
  // define steps and add your bash commands
  step("build", () => ["vite build"]),
]);

Send commands to remotes.

step("build", () => ssh([host], ["nginx -t", "systemclt restart nginx"])),

Early exec some commands to process the result.

const pwd = await exec("pwd");

Docker helpers

Edit a Docker Object.

const docker = new Docker({
  containers: [
    {
      name: "my_container",
      image: {
        name: "node:latest",
      },
    },
  ],
});

Add autogenerated bash commands to your pipeline.

pipeline("deploy", () => [
  // add bash commands autogenerated by the docker helper
  step("create:containers", () => [docker.containers.create()]),
]);

Service helpers

...