Repository navigation
Closed
Epic
5 / 55 of 5 issues completed
Copy link
Labels
area/pluginPlugin-related issue or feature requestkind/cooldownGreat candidate for the cooldown period
Description
Feature description
Context
We want each submodule of plugin-scripts to expose two triggers:
ScriptTriggerCommandsTrigger
The goal is to allow a flow to be triggered whenever:
- the underlying script command is executed (
ScriptTrigger) - all the commands from the Commands task is executed (
CommandsTrigger)
In addition, each trigger must support an exit condition so the trigger can decide whether it emits an event depending on the execution result.
Example: for plugin-script-shell we should be able to configure:
exitCondition: "exit 1"(or similar) to trigger only on failed execution.
✅ What to implement
For each sub-plugin in plugin-scripts, add:
1. ScriptTrigger
- Triggers when the sub-plugin script execution is performed.
- Must emit an event containing:
commandexecutedargumentsenv(if available)exitCodestdout/stderr(if capture is enabled)- relevant contextual metadata (execution id, namespace, flow id, etc.)
2. CommandsTrigger
- Triggers when the commands task is executed (the multi-commands task of the sub-plugin).
- Must emit an event containing:
- list of commands executed (or the matched one)
- exit code(s)
- stdout/stderr if available
- metadata (execution id, namespace, flow id, etc.)
🔧 Trigger configuration requirements
Each trigger should accept at least:
commandPattern(string / regex / glob)argumentsPattern(optional)exitCondition(string expression)
Where exitCondition can match on:
- exit code (
exitCode == 1) - output (
stdout contains "...") - or a literal shell-style condition (ex:
"exit 1"for shell plugin)
Example YAML
triggers:
- id: on_shell_fail
type: io.kestra.plugin.scripts.shell.triggers.ScriptTrigger
commandPattern: ".*"
exitCondition: "exit 1"
triggers:
- id: on_any_commands
type: io.kestra.plugin.scripts.shell.triggers.CommandsTrigger
commandPattern: ".*"
exitCondition: "exit 0"Sub-issues
Collapse Sub-issuesSub-issues
Loading 5 sub-issues
Metadata
Metadata
Assignees
Labels
area/pluginPlugin-related issue or feature requestkind/cooldownGreat candidate for the cooldown period
Type
Fields
Stage
Done
Activity
rishi-jat commentedon Mar 3, 2026
@fdelbrayelle could you assign this whole issue to me ? or should I target sub issues ? Thanks!
5 remaining items
feat(node): add ScriptTrigger and CommandsTrigger with tests (#326)
Pradumnasaraf commentedon May 26, 2026
Shell and Python triggers are working as expected, but the Go, Ruby and Node triggers do not create executions. Reopened the respective issues.
#321 (comment)
#320 (comment)
#319 (comment)
Introduce ScriptTrigger & CommandsTrigger for the Deno plugin
Introduce ScriptTrigger & CommandsTrigger for the Bun plugin
Introduce ScriptTrigger & CommandsTrigger for the .NET plugin
Introduce ScriptTrigger & CommandsTrigger for the Deno plugin (#434)
Introduce ScriptTrigger & CommandsTrigger for the PowerShell plugin
Introduce ScriptTrigger & CommandsTrigger for the .NET plugin
Introduce ScriptTrigger & CommandsTrigger for the Bun plugin
Introduce ScriptTrigger & CommandsTrigger for the PowerShell plugin
feat(bun): introduce ScriptTrigger & CommandsTrigger for the Bun plug…
Introduce ScriptTrigger & CommandsTrigger for the .NET plugin (#435)
Introduce ScriptTrigger & CommandsTrigger for the PowerShell plugin (#…