Skip to content

Commit

Permalink
feat(tasks): add some example for bash tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Sep 13, 2022
1 parent 2f4d59d commit ca8b96d
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion core/src/main/java/io/kestra/core/tasks/scripts/Bash.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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",
}
)
}
)
Expand Down

0 comments on commit ca8b96d

Please sign in to comment.