fix: RunScriptCommand is now RunCommand

This commit is contained in:
Jon Brookes 2025-07-15 10:45:37 +01:00
parent a21c403a8c
commit be438cd0b3
3 changed files with 15 additions and 15 deletions

View file

@ -20,7 +20,7 @@ A short, 2 step pipeline configuration can look like :
},
{
"name": "run inf redis secret",
"function": "RunScriptCommand",
"function": "RunCommand",
"params": ["./scripts/create_php_configmap_ctl.sh"],
"retryCount": 0,
"shouldAbort": true
@ -34,7 +34,7 @@ Object task records are executed in a `[]` list and in sequence.
Each task has a `name` to be displayed in logs.
Each task calls a `Function` that is registered within `infctl` and that accepts `params` string, which are any parameters to be passed to that function, script or executable. The simplest example being `RunScriptCommand` which accepts the path to a script or executable as its `params`. This can be anything but can be as simple as :
Each task calls a `Function` that is registered within `infctl` and that accepts `params` string, which are any parameters to be passed to that function, script or executable. The simplest example being `RunCommand` which accepts the path to a script or executable as its `params`. This can be anything but can be as simple as :
```bash
echo "hello world"

View file

@ -36,7 +36,7 @@ Ensures a Kubernetes namespace exists.
}
```
### `RunScriptCommand`
### `RunCommand`
Executes a shell command, script, or executable.
**Parameters:**
@ -46,7 +46,7 @@ Executes a shell command, script, or executable.
```json
{
"name": "run setup script",
"function": "RunScriptCommand",
"function": "RunCommand",
"params": ["./scripts/create_php_configmap_ctl.sh"],
"retryCount": 0,
"shouldAbort": true
@ -56,7 +56,7 @@ Executes a shell command, script, or executable.
```json
{
"name": "say hello",
"function": "RunScriptCommand",
"function": "RunCommand",
"params": ["echo 'hello world'"],
"retryCount": 0,
"shouldAbort": true
@ -81,4 +81,4 @@ Executes a shell command, script, or executable.
- Failed tasks retry up to `retryCount` times
- If `shouldAbort` is `true` and task fails, pipeline stops
- If `shouldAbort` is `false`, pipeline continues to next task
- Unlimited flexibility through `RunScriptCommand` for any automation
- Unlimited flexibility through `RunCommand` for any automation

View file

@ -18,7 +18,7 @@ A pipeline is a JSON array of task objects. Each task represents a single operat
},
{
"name": "run inf redis secret",
"function": "RunScriptCommand",
"function": "RunCommand",
"params": ["./scripts/create_php_configmap_ctl.sh"],
"retryCount": 0,
"shouldAbort": true
@ -38,8 +38,8 @@ A pipeline is a JSON array of task objects. Each task represents a single operat
#### `function`
- **Type:** `string`
- **Description:** Name of the function registered within infctl
- **Known Functions:** `k8sNamespaceExists`, `RunScriptCommand`
- **Example:** `"RunScriptCommand"`
- **Known Functions:** `k8sNamespaceExists`, `RunCommand`
- **Example:** `"RunCommand"`
#### `params`
- **Type:** `array`
@ -68,7 +68,7 @@ Based on the documented examples:
- **Parameters:** `[namespace: string]`
- **Description:** Ensures a Kubernetes namespace exists
#### `RunScriptCommand`
#### `RunCommand`
- **Parameters:** `[command: string]`
- **Description:** Executes a shell command, script, or executable
- **Notes:** Can be any command, script path, or executable. Task fails if command returns non-zero exit code
@ -87,7 +87,7 @@ Based on the documented examples:
},
{
"name": "run inf redis secret",
"function": "RunScriptCommand",
"function": "RunCommand",
"params": ["./scripts/create_php_configmap_ctl.sh"],
"retryCount": 0,
"shouldAbort": true
@ -100,7 +100,7 @@ Based on the documented examples:
[
{
"name": "say hello",
"function": "RunScriptCommand",
"function": "RunCommand",
"params": ["echo 'hello world'"],
"retryCount": 0,
"shouldAbort": true
@ -113,14 +113,14 @@ Based on the documented examples:
[
{
"name": "optional cleanup",
"function": "RunScriptCommand",
"function": "RunCommand",
"params": ["rm -f /tmp/tempfile"],
"retryCount": 0,
"shouldAbort": false
},
{
"name": "main deployment",
"function": "RunScriptCommand",
"function": "RunCommand",
"params": ["./deploy.sh"],
"retryCount": 2,
"shouldAbort": true
@ -133,4 +133,4 @@ Based on the documented examples:
1. **Tasks execute in sequence** - Each task in the array runs one after another
2. **Failure handling** - If a task fails (returns non-zero), it may be retried up to `retryCount` times
3. **Pipeline stopping** - If `shouldAbort` is `true` and task fails, pipeline stops. If `false`, pipeline continues
4. **Unlimited flexibility** - `RunScriptCommand` can execute any script, command, or executable for complete automation flexibility
4. **Unlimited flexibility** - `RunCommand` can execute any script, command, or executable for complete automation flexibility