Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.models.annotations.Example;
import io.kestra.core.models.annotations.Plugin;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.property.Property;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.runners.TargetOS;
Expand Down Expand Up @@ -70,12 +71,14 @@ public class Commands extends AbstractExecScript implements RunnableTask<ScriptO
private static final String DEFAULT_IMAGE = "oven/bun";

@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "The commands to run."
)
@NotNull
@PluginProperty(group = "main")
protected Property<List<String>> commands;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ public class Script extends AbstractExecScript implements RunnableTask<ScriptOut
private static final String DEFAULT_IMAGE = "oven/bun";

@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "The inline script content. This property is intended for the script file's content as a (multiline) string, not a path to a file."
)
@NotNull
@PluginProperty(language = MonacoLanguages.JAVASCRIPT)
@PluginProperty(language = MonacoLanguages.JAVASCRIPT, group = "main")
protected Property<String> script;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
import io.kestra.core.models.annotations.PluginProperty;

@SuperBuilder
@ToString
Expand Down Expand Up @@ -55,12 +56,14 @@ public class Commands extends AbstractExecScript implements RunnableTask<ScriptO
description = "Docker image used to run the commands; defaults to 'denoland/deno'. Include needed dependencies or install them in beforeCommands."
)
@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Commands to execute",
description = "List of Deno commands executed in order inside the container; use beforeCommands to install deps and inputFiles to stage sources. Add --allow-* flags as required by your script."
)
@PluginProperty(group = "main")
protected Property<List<String>> commands;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ public class Script extends AbstractExecScript implements RunnableTask<ScriptOut
description = "Docker image used to run the script; defaults to 'denoland/deno'. Include dependencies or install them in beforeCommands."
)
@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Inline Deno script",
description = "Script content written inline; saved as a temporary .ts file and executed with 'deno run'."
)
@NotNull
@PluginProperty(language = MonacoLanguages.TYPESCRIPT)
@PluginProperty(language = MonacoLanguages.TYPESCRIPT, group = "main")
protected Property<String> script;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.models.annotations.Example;
import io.kestra.core.models.annotations.Plugin;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.property.Property;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.runners.TargetOS;
Expand Down Expand Up @@ -76,13 +77,15 @@ public class Commands extends AbstractExecScript implements RunnableTask<ScriptO
description = "Docker image used to run the commands; defaults to 'golang'. Ensure the image includes needed toolchain or install via beforeCommands."
)
@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Commands to execute",
description = "List of Go commands executed in order inside the container; combine with beforeCommands for module init/get and inputFiles to stage sources."
)
@NotNull
@PluginProperty(group = "main")
protected Property<List<String>> commands;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import io.kestra.core.models.annotations.PluginProperty;

@SuperBuilder
@ToString
Expand Down Expand Up @@ -84,13 +85,15 @@ public class CommandsTrigger extends AbstractTrigger
"""
)
@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Go commands to execute.",
description = "Commands executed on each poll (same semantics as the Go Commands task)."
)
@NotNull
@PluginProperty(group = "main")
protected Property<List<String>> commands;

@Schema(
Expand All @@ -106,13 +109,15 @@ public class CommandsTrigger extends AbstractTrigger
"""
)
@NotNull
@PluginProperty(group = "main")
protected Property<String> exitCondition;

@Schema(
title = "Check interval",
description = "Interval between polling evaluations."
)
@Builder.Default
@PluginProperty(group = "execution")
private final Duration interval = Duration.ofSeconds(60);

@Schema(
Expand All @@ -123,6 +128,7 @@ public class CommandsTrigger extends AbstractTrigger
"""
)
@Builder.Default
@PluginProperty(group = "advanced")
protected Property<Boolean> edge = Property.ofValue(true);

@Builder.Default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ public class Script extends AbstractExecScript implements RunnableTask<ScriptOut
description = "Docker image used to run the script; defaults to 'golang'. Include required toolchain or install in beforeCommands."
)
@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Inline Go script",
description = "Go source code as a multi-line string; written to a temporary .go file and executed with 'go run'. For existing files, use the Commands task."
)
@NotNull
@PluginProperty(language = MonacoLanguages.GO)
@PluginProperty(language = MonacoLanguages.GO, group = "main")
protected Property<String> script;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import io.kestra.core.models.annotations.Example;
import io.kestra.core.models.annotations.Plugin;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.conditions.ConditionContext;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.models.property.Property;
Expand Down Expand Up @@ -91,6 +92,7 @@ public class ScriptTrigger extends AbstractTrigger
"""
)
@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
Expand All @@ -100,6 +102,7 @@ public class ScriptTrigger extends AbstractTrigger
"""
)
@NotNull
@PluginProperty(group = "main")
protected Property<String> script;

@Schema(
Expand All @@ -110,6 +113,7 @@ public class ScriptTrigger extends AbstractTrigger
"""
)
@NotNull
@PluginProperty(group = "main")
protected Property<String> exitCondition;

@Schema(
Expand All @@ -119,6 +123,7 @@ public class ScriptTrigger extends AbstractTrigger
"""
)
@Builder.Default
@PluginProperty(group = "execution")
private final Duration interval = Duration.ofSeconds(60);

@Schema(
Expand All @@ -128,6 +133,7 @@ When true (default), emit only on a transition from not matching to matching. Wh
"""
)
@Builder.Default
@PluginProperty(group = "advanced")
protected Property<Boolean> edge = Property.ofValue(true);

@Builder.Default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.models.annotations.Example;
import io.kestra.core.models.annotations.Plugin;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.property.Property;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.runners.TargetOS;
Expand Down Expand Up @@ -76,12 +77,14 @@ public class Commands extends AbstractExecScript implements RunnableTask<ScriptO
private static final String DEFAULT_IMAGE = "groovy";

@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "The commands to run."
)
@NotNull
@PluginProperty(group = "main")
protected Property<List<String>> commands;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.models.annotations.Example;
import io.kestra.core.models.annotations.Plugin;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.property.Property;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.runners.TargetOS;
Expand Down Expand Up @@ -75,12 +76,14 @@ public class Script extends AbstractExecScript implements RunnableTask<ScriptOut
private static final String DEFAULT_IMAGE = "groovy";

@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "The inline script content. This property is intended for the script file's content as a (multiline) string, not a path to a file."
)
@NotNull
@PluginProperty(group = "main")
protected Property<String> script;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.SuperBuilder;
import io.kestra.core.models.annotations.PluginProperty;

@SuperBuilder
@ToString
Expand Down Expand Up @@ -53,13 +54,15 @@ public class Commands extends AbstractExecScript implements RunnableTask<ScriptO
description = "Docker image used to run the commands; defaults to 'jbangdev/jbang-action'. Override only with an image that includes JBang."
)
@Builder.Default
@PluginProperty(group = "execution")
private Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Commands to execute",
description = "List of JBang commands executed in order inside the container."
)
@NotNull
@PluginProperty(group = "main")
private Property<List<String>> commands;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.kestra.core.exceptions.IllegalVariableEvaluationException;
import io.kestra.core.models.annotations.Example;
import io.kestra.core.models.annotations.Plugin;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.property.Property;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.runners.TargetOS;
Expand Down Expand Up @@ -110,13 +111,15 @@ public class Script extends AbstractExecScript implements RunnableTask<ScriptOut
description = "Docker image used to run the script; defaults to 'jbangdev/jbang-action'. Provide an image that includes JBang if overriding."
)
@Builder.Default
@PluginProperty(group = "execution")
private Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Inline JBang script",
description = "Script body as a multi-line string; written to a temp file and executed with `jbang`. For existing files or JARs, use the Commands task."
)
@NotNull
@PluginProperty(group = "main")
private Property<String> script;

@Schema(
Expand All @@ -125,6 +128,7 @@ public class Script extends AbstractExecScript implements RunnableTask<ScriptOut
)
@Builder.Default
@NotNull
@PluginProperty(group = "advanced")
private Property<String> extension = Property.ofValue(".java");

@Schema(
Expand All @@ -133,6 +137,7 @@ public class Script extends AbstractExecScript implements RunnableTask<ScriptOut
)
@NotNull
@Builder.Default
@PluginProperty(group = "advanced")
private Property<Boolean> quiet = Property.ofValue(true);

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.SuperBuilder;
import io.kestra.core.models.annotations.PluginProperty;

@SuperBuilder
@ToString
Expand Down Expand Up @@ -62,13 +63,15 @@ public class Commands extends AbstractExecScript implements RunnableTask<ScriptO
description = "Docker image used to run the commands; defaults to 'julia'. Include dependencies or install them in beforeCommands."
)
@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Commands to execute",
description = "List of Julia commands executed in order inside the container; combine with beforeCommands to add packages and inputFiles to stage sources."
)
@NotNull
@PluginProperty(group = "main")
protected Property<List<String>> commands;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ public class Script extends AbstractExecScript implements RunnableTask<ScriptOut
description = "Docker image used to run the script; defaults to 'julia'. Include dependencies or install them in beforeCommands."
)
@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Inline Julia script",
description = "Julia source as a multi-line string; saved to a temporary .jl file and executed with 'julia'. For existing files, use the Commands task."
)
@NotNull
@PluginProperty(language = MonacoLanguages.JULIA)
@PluginProperty(language = MonacoLanguages.JULIA, group = "main")
protected Property<String> script;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
import io.kestra.core.models.annotations.PluginProperty;

@SuperBuilder
@ToString
Expand Down Expand Up @@ -49,12 +50,14 @@ public class Commands extends AbstractExecScript implements RunnableTask<ScriptO
description = "Docker image used to run the commands; defaults to 'nickblah/lua'. Include needed modules or install them in beforeCommands."
)
@Builder.Default
@PluginProperty(group = "execution")
protected Property<String> containerImage = Property.ofValue(DEFAULT_IMAGE);

@Schema(
title = "Commands to execute",
description = "List of Lua commands executed in order inside the container; combine with beforeCommands for setup and inputFiles to stage sources."
)
@PluginProperty(group = "main")
protected Property<List<String>> commands;

@Override
Expand Down
Loading
Loading