Skip to content

Commit

Permalink
fix(docs): Fix examples looping over files' paths (#146)
Browse files Browse the repository at this point in the history
* fix(docs): Fix examples looping over files' paths

* Restore unintended rename
  • Loading branch information
nicoallgood committed Sep 6, 2024
1 parent 6c7045f commit 9fb3301
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
14 changes: 7 additions & 7 deletions src/main/java/io/kestra/plugin/fs/ftp/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"tasks:",
" - id: for_each_file",
" type: io.kestra.plugin.core.flow.EachSequential",
" value: \"{{ trigger.files | jq('.path') }}\"",
" value: \"{{ trigger.files }}\"",
" tasks:",
" - id: return",
" type: io.kestra.plugin.core.debug.Return",
" format: \"{{ taskrun.value }}\"",
" format: \"{{ taskrun.value | jq('.path') }}\"",
"",
"triggers:",
" - id: watch",
Expand All @@ -61,18 +61,18 @@
"tasks:",
" - id: for_each_file",
" type: io.kestra.plugin.core.flow.EachSequential",
" value: \"{{ trigger.files | jq('.name') }}\"",
" value: \"{{ trigger.files }}\"",
" tasks:",
" - id: return",
" type: io.kestra.plugin.core.debug.Return",
" format: \"{{ taskrun.value }}\"",
" format: \"{{ taskrun.value | jq('.name') }}\"",
" - id: delete",
" type: io.kestra.plugin.fs.ftp.Delete",
" host: localhost",
" port: 21",
" username: foo",
" password: bar",
" uri: \"/in/{{ taskrun.value }}\"",
" uri: \"/in/{{ taskrun.value | jq('.name') }}\"",
"",
"triggers:",
" - id: watch",
Expand All @@ -96,11 +96,11 @@
tasks:
- id: each
type: io.kestra.plugin.core.flow.EachSequential
value: "{{ trigger.files | jq('.path') }}"
value: "{{ trigger.files }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ taskrun.value }}"
format: "{{ taskrun.value | jq('.path') }}"
triggers:
- id: watch
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/kestra/plugin/fs/ftps/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
"tasks:",
" - id: for_each_file",
" type: io.kestra.plugin.core.flow.EachSequential",
" value: \"{{ trigger.files | jq('.path') }}\"",
" value: \"{{ trigger.files }}\"",
" tasks:",
" - id: return",
" type: io.kestra.plugin.core.debug.Return",
" format: \"{{ taskrun.value }}\"",
" format: \"{{ taskrun.value | jq('.path') }}\"",
"",
"triggers:",
" - id: watch",
Expand All @@ -64,11 +64,11 @@
tasks:
- id: each
type: io.kestra.plugin.core.flow.EachSequential
value: "{{ trigger.files | jq('.path') }}"
value: "{{ trigger.files }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ taskrun.value }}"
format: "{{ taskrun.value | jq('.path') }}"
triggers:
- id: watch
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/kestra/plugin/fs/sftp/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"tasks:",
" - id: for_each_file",
" type: io.kestra.plugin.core.flow.EachSequential",
" value: \"{{ trigger.files | jq('.path') }}\"",
" value: \"{{ trigger.files }}\"",
" tasks:",
" - id: return",
" type: io.kestra.plugin.core.debug.Return",
" format: \"{{ taskrun.value }}\"",
" format: \"{{ taskrun.value | jq('.path') }}\"",
"",
"triggers:",
" - id: watch",
Expand Down Expand Up @@ -95,11 +95,11 @@
tasks:
- id: each
type: io.kestra.plugin.core.flow.EachSequential
value: "{{ trigger.files | jq('.path') }}"
value: "{{ trigger.files }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ taskrun.value }}"
format: "{{ taskrun.value | jq('.path') }}"
triggers:
- id: watch
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/io/kestra/plugin/fs/smb/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"tasks:",
" - id: for_each_file",
" type: io.kestra.plugin.core.flow.EachSequential",
" value: \"{{ trigger.files | jq('.path') }}\"",
" value: \"{{ trigger.files }}\"",
" tasks:",
" - id: return",
" type: io.kestra.plugin.core.debug.Return",
" format: \"{{ taskrun.value }}\"",
" format: \"{{ taskrun.value | jq('.path') }}\"",
"",
"triggers:",
" - id: watch",
Expand All @@ -64,18 +64,18 @@
"tasks:",
" - id: for_each_file",
" type: io.kestra.plugin.core.flow.EachSequential",
" value: \"{{ trigger.files | jq('.path') }}\"",
" value: \"{{ trigger.files }}\"",
" tasks:",
" - id: return",
" type: io.kestra.plugin.core.debug.Return",
" format: \"{{ taskrun.value }}\"",
" format: \"{{ taskrun.value | jq('.path') }}\"",
" - id: delete",
" type: io.kestra.plugin.fs.smb.Delete",
" host: localhost",
" port: 445",
" username: foo",
" password: bar",
" uri: \"/my_share/in/{{ taskrun.value }}\"",
" uri: \"/my_share/in/{{ taskrun.value | jq('.path') }}\"",
"",
"triggers:",
" - id: watch",
Expand All @@ -101,11 +101,11 @@
tasks:
- id: each
type: io.kestra.plugin.core.flow.EachSequential
value: "{{ trigger.files | jq('.path') }}"
value: "{{ trigger.files }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ taskrun.value }}"
format: "{{ taskrun.value | jq('.path') }}"
triggers:
- id: watch
Expand Down

0 comments on commit 9fb3301

Please sign in to comment.