|
1 week ago | |
---|---|---|
.pipelight/config | 1 week ago | |
exec | 4 weeks ago | |
pipelight | 1 week ago | |
pipeline | 1 week ago | |
playground/examples | 1 week ago | |
shared | 1 week ago | |
typescript | 2 weeks ago | |
utils | 1 week ago | |
.gitignore | 1 month ago | |
Cargo.lock | 1 week ago | |
Cargo.toml | 4 weeks ago | |
README.md | 3 weeks ago | |
ROADMAP.md | 1 week ago | |
pipelight.ts | 1 week ago |
README.md
Pipelight
A tiny automation tool.
Wrap your bash script with Typescript. And trigger those pipelines automatically on git action.
Define, Run pipe, check Logs, without living your terminal.
Install
Package only available on Arch linux. (Available soon on Debian/Ubuntu and Fedora)
Install from the AUR
paru -S pipelight
Or from source
git clone <this_repo>
cd pipelight
cargo build --release
cp target/release/pipelight* /<my_bin_directory>/
TL;DR
If you're too can not stand the suspens and go further in the documentation.. Just read the USAGE section, install and try the Cli. It will yell a few times until your config file is good. But in the end it will run smooth. Enjoy!
In short: Pipelight is easy to install, fast, and usable for every kind of project.
Usage
Configuration example
Create a config file at the root of your project
//pipelight.config.ts
const config = {
pipelines: [
{
name: "my_pipeline",
steps: [
{
name: "list working directory",
commands: ["ls -alh"]
},
{
name: "get working directory",
commands: ["pwd"]
}
]
}
]
};
export default config;
Command Line Interface (Cli)
In the same folder..
List pipelines defined in config file
pipelight ls
or
pipelight ls -vvv
Run a pipeline
pipelight run <pipeline_name>
Compulsively check execution with pretty termial logs
pipelight logs
Verbosity can be increased..
pipelight logs -vvv
Abort pipeline execution
pipelight stop <pipeline_name>
Triggers
Only works in a Git repo.
//pipelight.config.ts
const config = {
pipelines: [
{
name: "automatic",
triggers: [
{
actions: ["pre-push", "pre-commit"],
branches: ["master"]
}
]
}
]
};
export default config;
Define triggers as combinations of branch-name and git-hooks.
How it works
Think of it as a bash wrapper.
When we first deploy a project we quickly edit some raw bash scripts. It's clearly the fastest way to test.
//deploy.sh
vitest
vite build
rsync local_files to_my_remote_server
But at some point, this method lakes verbosity, and automation... Just put your commands into a Pipeline object.
//pipelight.config.ts
import { Config } from "npm:pipelight";
const config: Config = {
pipelines: [
{
name: "deploy",
steps: [
{
name: "test",
commands: ["vitest"]
},
{
name: "build",
commands: ["vite build"]
},
{
name: "send",
commands: ["rsync local_files to_my_remote_server"]
}
]
}
]
};
export default config;
Add triggers, appreciate logs, and bettern your deployment scripts.