fix: RunScriptCommand is now RunCommand
This commit is contained in:
parent
a21c403a8c
commit
be438cd0b3
3 changed files with 15 additions and 15 deletions
|
|
@ -20,7 +20,7 @@ A short, 2 step pipeline configuration can look like :
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "run inf redis secret",
|
"name": "run inf redis secret",
|
||||||
"function": "RunScriptCommand",
|
"function": "RunCommand",
|
||||||
"params": ["./scripts/create_php_configmap_ctl.sh"],
|
"params": ["./scripts/create_php_configmap_ctl.sh"],
|
||||||
"retryCount": 0,
|
"retryCount": 0,
|
||||||
"shouldAbort": true
|
"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 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
|
```bash
|
||||||
echo "hello world"
|
echo "hello world"
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ Ensures a Kubernetes namespace exists.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### `RunScriptCommand`
|
### `RunCommand`
|
||||||
Executes a shell command, script, or executable.
|
Executes a shell command, script, or executable.
|
||||||
|
|
||||||
**Parameters:**
|
**Parameters:**
|
||||||
|
|
@ -46,7 +46,7 @@ Executes a shell command, script, or executable.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name": "run setup script",
|
"name": "run setup script",
|
||||||
"function": "RunScriptCommand",
|
"function": "RunCommand",
|
||||||
"params": ["./scripts/create_php_configmap_ctl.sh"],
|
"params": ["./scripts/create_php_configmap_ctl.sh"],
|
||||||
"retryCount": 0,
|
"retryCount": 0,
|
||||||
"shouldAbort": true
|
"shouldAbort": true
|
||||||
|
|
@ -56,7 +56,7 @@ Executes a shell command, script, or executable.
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name": "say hello",
|
"name": "say hello",
|
||||||
"function": "RunScriptCommand",
|
"function": "RunCommand",
|
||||||
"params": ["echo 'hello world'"],
|
"params": ["echo 'hello world'"],
|
||||||
"retryCount": 0,
|
"retryCount": 0,
|
||||||
"shouldAbort": true
|
"shouldAbort": true
|
||||||
|
|
@ -81,4 +81,4 @@ Executes a shell command, script, or executable.
|
||||||
- Failed tasks retry up to `retryCount` times
|
- Failed tasks retry up to `retryCount` times
|
||||||
- If `shouldAbort` is `true` and task fails, pipeline stops
|
- If `shouldAbort` is `true` and task fails, pipeline stops
|
||||||
- If `shouldAbort` is `false`, pipeline continues to next task
|
- If `shouldAbort` is `false`, pipeline continues to next task
|
||||||
- Unlimited flexibility through `RunScriptCommand` for any automation
|
- Unlimited flexibility through `RunCommand` for any automation
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ A pipeline is a JSON array of task objects. Each task represents a single operat
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "run inf redis secret",
|
"name": "run inf redis secret",
|
||||||
"function": "RunScriptCommand",
|
"function": "RunCommand",
|
||||||
"params": ["./scripts/create_php_configmap_ctl.sh"],
|
"params": ["./scripts/create_php_configmap_ctl.sh"],
|
||||||
"retryCount": 0,
|
"retryCount": 0,
|
||||||
"shouldAbort": true
|
"shouldAbort": true
|
||||||
|
|
@ -38,8 +38,8 @@ A pipeline is a JSON array of task objects. Each task represents a single operat
|
||||||
#### `function`
|
#### `function`
|
||||||
- **Type:** `string`
|
- **Type:** `string`
|
||||||
- **Description:** Name of the function registered within infctl
|
- **Description:** Name of the function registered within infctl
|
||||||
- **Known Functions:** `k8sNamespaceExists`, `RunScriptCommand`
|
- **Known Functions:** `k8sNamespaceExists`, `RunCommand`
|
||||||
- **Example:** `"RunScriptCommand"`
|
- **Example:** `"RunCommand"`
|
||||||
|
|
||||||
#### `params`
|
#### `params`
|
||||||
- **Type:** `array`
|
- **Type:** `array`
|
||||||
|
|
@ -68,7 +68,7 @@ Based on the documented examples:
|
||||||
- **Parameters:** `[namespace: string]`
|
- **Parameters:** `[namespace: string]`
|
||||||
- **Description:** Ensures a Kubernetes namespace exists
|
- **Description:** Ensures a Kubernetes namespace exists
|
||||||
|
|
||||||
#### `RunScriptCommand`
|
#### `RunCommand`
|
||||||
- **Parameters:** `[command: string]`
|
- **Parameters:** `[command: string]`
|
||||||
- **Description:** Executes a shell command, script, or executable
|
- **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
|
- **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",
|
"name": "run inf redis secret",
|
||||||
"function": "RunScriptCommand",
|
"function": "RunCommand",
|
||||||
"params": ["./scripts/create_php_configmap_ctl.sh"],
|
"params": ["./scripts/create_php_configmap_ctl.sh"],
|
||||||
"retryCount": 0,
|
"retryCount": 0,
|
||||||
"shouldAbort": true
|
"shouldAbort": true
|
||||||
|
|
@ -100,7 +100,7 @@ Based on the documented examples:
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "say hello",
|
"name": "say hello",
|
||||||
"function": "RunScriptCommand",
|
"function": "RunCommand",
|
||||||
"params": ["echo 'hello world'"],
|
"params": ["echo 'hello world'"],
|
||||||
"retryCount": 0,
|
"retryCount": 0,
|
||||||
"shouldAbort": true
|
"shouldAbort": true
|
||||||
|
|
@ -113,14 +113,14 @@ Based on the documented examples:
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "optional cleanup",
|
"name": "optional cleanup",
|
||||||
"function": "RunScriptCommand",
|
"function": "RunCommand",
|
||||||
"params": ["rm -f /tmp/tempfile"],
|
"params": ["rm -f /tmp/tempfile"],
|
||||||
"retryCount": 0,
|
"retryCount": 0,
|
||||||
"shouldAbort": false
|
"shouldAbort": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "main deployment",
|
"name": "main deployment",
|
||||||
"function": "RunScriptCommand",
|
"function": "RunCommand",
|
||||||
"params": ["./deploy.sh"],
|
"params": ["./deploy.sh"],
|
||||||
"retryCount": 2,
|
"retryCount": 2,
|
||||||
"shouldAbort": true
|
"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
|
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
|
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
|
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue