https://github.com/linyows/probe
Probe is a YAML-based workflow automation tool.
https://github.com/linyows/probe
Last synced: 4 months ago
JSON representation
Probe is a YAML-based workflow automation tool.
- Host: GitHub
- URL: https://github.com/linyows/probe
- Owner: linyows
- License: mit
- Created: 2024-08-20T06:20:30.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-12-27T15:05:24.000Z (4 months ago)
- Last Synced: 2025-01-02T20:51:53.895Z (4 months ago)
- Language: Go
- Homepage:
- Size: 119 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
Probe is a YAML-based workflow automation tool. It uses plugin-based actions to execute workflows, making it highly flexible and extensible.
Example using REST API:
```yaml
name: Example http workflow
jobs:
- name: Request REST API
defaults:
http:
url: http://localhost:9000
headers:
authorization: Bearer {env.TOKEN}
accept: application/json
steps:
- name: Get a user information
uses: http
with:
get: /api/v1/me
test: res.status == 200 && res.body.uname == foobar
- name: Update user
uses: http
with:
put: /api/v1/users/{steps[0].res.body.uid}
body:
profile: "I'm a software engineer living in Fukuoka."
test: res.status == 201
```Example of sending repeated emails:
```yaml
name: Send queue congestion experiment
jobs:
- name: Normal sender
id: normal-sender
repeat:
count: 60
interval: 10
steps:
- use: smtp
with:
addr: localhost:5871
from: [email protected]
to: [email protected]
my-hostname: msa1-local
subject: Experiment A
- name: Throttled sender
id: throtteled-sender
repeat:
count: 60
interval: 10
steps:
- use: smtp
with:
addr: localhost:5872
from: [email protected]
to: [email protected]
my-hostname: msa2-local
subject: Experiment B
- name: Export latency as CSV
needs:
- normal-sender
- throtteled-sender
waitif: sh(postqueue -p 2> /dev/null | grep -c '^[A-F0-9]') != "0"
steps:
- use: mail-latency
with:
spath: /home/vmail
dpath: ./mail-latency.csv
```Features
--A probe workflow consists of jobs and steps contained in the jobs. Multiple jobs are executed asynchronously, and steps are executed in sequence. Step execution results are logged, and can be expanded in YAML using curly braces.
- Workflows can be automated using built-in http, mail, and shell actions
- Custom actions that meet your use cases can be created using protocol buffers
- Protocol-based YAML definitions provide low learning costs and high visibilityInstall
--Installation via various package managers is not yet supported, but will be soon.
```sh
go install github.com/linyows/probe/cmd/probe@latest
```Usage
--Run the workflow by passing the path to the yaml file where the workflow is defined to the workflow option.
```sh
probe --workflow ./worflow.yml
```To-Do
--Here are some additional features I'm considering:
- [ ] Support waitif and needs params in job
- [ ] Support rich output
- [ ] Support multipart/form-data in http actions
- [ ] Support some actions:
- [ ] grpc actions
- [ ] graphql actions
- [ ] ssh actions
- [ ] amqp actions
- [ ] imap actions
- [ ] udp actions
- [ ] Support post-actions
- [ ] Support pre-job and post-jobAuthor
--[linyows](https://github.com/linyows)