-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to configure the
args
attribute in the loop
block of …
- Loading branch information
1 parent
6dddf51
commit f165384
Showing
2 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
internal/es/estest/test_suite_mod/pipelines/pipeline_loop_with_args.fp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
pipeline "pipeline_loop_test" { | ||
|
||
param "message" { | ||
type = string | ||
} | ||
|
||
param "index" { | ||
type = number | ||
} | ||
|
||
output "greet_world" { | ||
value = "Hello world! ${param.message} ${param.index}" | ||
} | ||
} | ||
|
||
pipeline "simple_pipeline_loop_with_args" { | ||
|
||
param "test_message" { | ||
type = string | ||
default = "loop index" | ||
} | ||
|
||
step "pipeline" "repeat_pipeline_loop_test" { | ||
pipeline = pipeline.pipeline_loop_test | ||
args = { | ||
message = "iteration index" | ||
index = 0 | ||
} | ||
|
||
loop { | ||
until = loop.index > 2 | ||
args = { | ||
message = "${param.test_message}_${loop.index}" | ||
index = loop.index | ||
} | ||
} | ||
} | ||
|
||
output "value" { | ||
value = step.pipeline.repeat_pipeline_loop_test | ||
} | ||
} | ||
|
||
pipeline "simple_pipeline_loop_with_arg_literal" { | ||
|
||
step "pipeline" "repeat_pipeline_loop_test" { | ||
pipeline = pipeline.pipeline_loop_test | ||
args = { | ||
message = "iteration index" | ||
index = 0 | ||
} | ||
|
||
loop { | ||
until = loop.index > 2 | ||
args = { | ||
message = "loop index" | ||
index = 1 | ||
} | ||
} | ||
} | ||
|
||
output "value" { | ||
value = step.pipeline.repeat_pipeline_loop_test | ||
} | ||
} |