2025-08-13 15:48:45 +01:00
|
|
|
---
|
|
|
|
|
level: 2
|
|
|
|
|
---
|
|
|
|
|
|
2025-08-27 10:54:58 +01:00
|
|
|
# RunCommand plugins
|
2025-08-13 15:48:45 +01:00
|
|
|
|
2025-08-27 10:54:58 +01:00
|
|
|
Plugins are any script or executable that print output and exit with a system code of 0 (OK) or greater (error).
|
2025-08-13 15:48:45 +01:00
|
|
|
|
|
|
|
|
````md magic-move {lines: true}
|
|
|
|
|
```bash
|
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
echo "HI THERE..."
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
# do some work...
|
|
|
|
|
sleep 10
|
|
|
|
|
|
|
|
|
|
echo "call the president..."
|
|
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
````
|
2025-08-27 10:54:58 +01:00
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
|
|
RunCommand plugins are scripts or executables that do two things
|
|
|
|
|
|
|
|
|
|
1. print some output that can be seen and logged
|
|
|
|
|
2. exit with a system code
|
|
|
|
|
|
|
|
|
|
The example is of a bash script but it could be any scripting language that can do the same.
|
|
|
|
|
|
|
|
|
|
It could be a compiled program, so long as it also outputs logging information to the terminal and exits with a system code of [0|1 or greater]
|
|
|
|
|
|
|
|
|
|
Long running scripts or commands are expected
|
|
|
|
|
|
|
|
|
|
exiting with 1 or greater will signify a failure of some kind
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-->
|