Add RunTask.shell task#898
Conversation
|
@ricardozanini could you share with me a example of arguments? Should be something similar to: document:
dsl: '1.0.1'
namespace: test
name: run-shell-example
version: '0.1.0'
do:
- runShell:
run:
shell:
command: 'kubectl'
arguments:
- 'apply'
- '-f'
- '/k8s'And the output should be: kubectl apply -f /k8sI am assuming that |
|
Great @fjtirado, nice abstractions ;) |
|
@mcruzdev yes, the arguments are a list: https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#shell-process Which kind of example do you need? |
Ok, it is all, I think I do not need a example 😄 I had a confusion due to |
You can do: arguments:
- key: valueMaybe in some use cases that would make sense. |
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
It is not clear to me again @ricardozanini, what is the real command statement in that case? The arguments will be used like an input (like |
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
fjtirado
left a comment
There was a problem hiding this comment.
Great work!
Just minor comments, except the error one.
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunShellExecutor.java
Outdated
Show resolved
Hide resolved
|
@mcruzdev I think we already discussed in Slack, but since the spec expects a map we can have the following cases: run:
shell:
command: 'echo "Hello"'
attributes:
- one
- two
- threeIn this case, the resulting command would be Now, if we have: run:
shell:
command: 'echo "Hello"'
attributes:
- key: one
- key: two
- key: threeThe resulting command would be Is that clear? |
Hi @ricardozanini, I created a workflow document with the The only way to use
|
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
Enable test only in linux (till we implement for other Operating systems) Run asynchrnously Signed-off-by: fjtirado <ftirados@redhat.com>
Enable test only in linux (till we implement for other Operating systems) Run asynchrnously Signed-off-by: fjtirado <ftirados@redhat.com>
Context
Implement RunTask.shell task:
Tracking
awaitreturnCloses #892