Context
Part of #313. plugin-scripts wants every submodule to expose a ScriptTrigger and a CommandsTrigger, so a flow can be triggered whenever the underlying script/commands execution completes, with an exit condition deciding whether the trigger fires based on the result (e.g. only on failure).
plugin-script-julia is missing both. Existing implementations in plugin-script-go, plugin-script-node, plugin-script-python, plugin-script-ruby, and plugin-script-shell (same package as the task classes, no nested subpackage) can be used as a reference.
What to implement
1. ScriptTrigger
- Triggers when
io.kestra.plugin.scripts.julia.Script execution completes.
- Emits an event containing: command executed, arguments, env (if available), exit code, stdout/stderr (if capture enabled), and contextual metadata (execution id, namespace, flow id).
2. CommandsTrigger
- Triggers when
io.kestra.plugin.scripts.julia.Commands execution completes.
- Emits an event containing: commands executed (or the matched one), exit code(s), stdout/stderr if available, and contextual metadata (execution id, namespace, flow id).
Trigger configuration requirements
Each trigger should accept at least:
commandPattern (string / regex / glob)
argumentsPattern (optional)
exitCondition (string expression — can match on exit code, output, or a literal condition)
Example YAML
triggers:
- id: on_julia_fail
type: io.kestra.plugin.scripts.julia.ScriptTrigger
commandPattern: ".*"
exitCondition: "exitCode != 0"
triggers:
- id: on_julia_commands
type: io.kestra.plugin.scripts.julia.CommandsTrigger
commandPattern: ".*"
exitCondition: "exitCode == 0"
Context
Part of #313.
plugin-scriptswants every submodule to expose aScriptTriggerand aCommandsTrigger, so a flow can be triggered whenever the underlying script/commands execution completes, with an exit condition deciding whether the trigger fires based on the result (e.g. only on failure).plugin-script-juliais missing both. Existing implementations inplugin-script-go,plugin-script-node,plugin-script-python,plugin-script-ruby, andplugin-script-shell(same package as the task classes, no nested subpackage) can be used as a reference.What to implement
1.
ScriptTriggerio.kestra.plugin.scripts.julia.Scriptexecution completes.2.
CommandsTriggerio.kestra.plugin.scripts.julia.Commandsexecution completes.Trigger configuration requirements
Each trigger should accept at least:
commandPattern(string / regex / glob)argumentsPattern(optional)exitCondition(string expression — can match on exit code, output, or a literal condition)Example YAML