From ca8b96defbb2250cddeeca7df2a7d850037b491c Mon Sep 17 00:00:00 2001 From: Ludovic DEHON Date: Tue, 13 Sep 2022 12:34:37 +0200 Subject: [PATCH] feat(tasks): add some example for bash tasks --- .../io/kestra/core/tasks/scripts/Bash.java | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/io/kestra/core/tasks/scripts/Bash.java b/core/src/main/java/io/kestra/core/tasks/scripts/Bash.java index 0dd92c0d1e..5ee05e0b9a 100644 --- a/core/src/main/java/io/kestra/core/tasks/scripts/Bash.java +++ b/core/src/main/java/io/kestra/core/tasks/scripts/Bash.java @@ -33,7 +33,7 @@ title = "Single bash command", code = { "commands:", - "- echo \"The current execution is : {{execution.id}}\"" + "- 'echo \"The current execution is : {{execution.id}}\"'" } ), @Example( @@ -56,6 +56,27 @@ "commands:", "- /bin/bash script.sh", } + ), + @Example( + title = "Run a command on a docker image", + code = { + "runner: DOCKER", + "dockerOptions:", + " image: php", + "commands:", + "- 'php -r 'print(phpversion() . \"\\n\");'", + } + ), + @Example( + title = "Execute cmd on windows", + code = { + "commands:", + " - 'echo \"The current execution is : {{execution.id}}\"'", + "exitOnFailed: false", + "interpreter: cmd", + "interpreterArgs:", + " - /c", + } ) } )