-
-
Notifications
You must be signed in to change notification settings - Fork 196
Open
Description
This feature would allow users to specify a list of values and then execute a command on each of those values.
The forEach
key would be added to the YAML file to specify the list of values to iterate over, and each value would be passed as a parameter named $_
, borrowed from Perl's syntax.
For example, the following YAML file would use the forEach
key to execute a command for each value in the VALUES
parameter:
params:
VALUES: 2010 2011 2012 2013
steps:
- name: task1
forEach: $VALUES
command: some_task $_
Also supports delimiter:
steps:
- name: send_requests
forEach:
from: $INPUT_DATA
delimiter: "---"
executor:
type: http
config:
timeout: 180
headers:
Accept: "application/json"
Content-Type: "application/json"
silent: true
body: "$_"
command: PUT https://some/api
GhisF, danie1k and dev-a
Metadata
Metadata
Assignees
Labels
No labels