-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.go
More file actions
41 lines (34 loc) · 1.07 KB
/
doc.go
File metadata and controls
41 lines (34 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
Package workflow provides a simple engine to sequentially run groups of shell
tasks, while providing a websocket to monitor progress.
Workflows are defined using a yaml file which contains variables declaration
and groups of tasks.
Tasks shell scripts can use functions like `output` and `progress` to publish
meaningful information to the websocket.
Tasks can have an optional relative `weight` value so a progress expressed in
percent is added in the status message.
# Example
This workflow declares a variable `OS` with the output of `uname` command, then
it defines two groups of tasks, one for Linux and one for Darwin.
Groups are being skipped based on the content of `OS`
vars:
OS: uname
groups:
- id: linuxGroup
skip_cmd: |
[ "$OS" != "Linux" ]
tasks:
- id: task1
weight: 50
cmd: |
output `ip a s eth0|grep inet`
- id: darwinGroup
skip_cmd: |
[ "$OS" != "Darwin" ]
tasks:
- id: task1
weight: 50
cmd: |
output `ifconfig en0|grep "inet "`
*/
package workflow