-
Hi How could I pass variables to an events with shell plugin ? Something like hostname of worker or some other info to let job/event aware of external info . Thx |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Beta Was this translation helpful? Give feedback.
-
Is it possible to pass the parameters when running an event on-demand? For e.g. you may want to customise the behaviour of the script, lets say you run a script to backfill last 1 hour data - you want to customize that for next run to 1 day, etc - this will be useful for Ondemand events. |
Beta Was this translation helpful? Give feedback.
All event parameters become environment variables in your jobs.
You can define parameters at the Plugin level, and then fill them in (give them values) at the event level. So maybe what you want is to copy the Shell Plugin, and add some text fields or dropdown menus, whatever you need.
Then, when you edit your event and assign your new Plugin to it, you can fill out the new fields:
This then becomes an environment variable you can use in your shell script. Note that it is upper-cased, so in this case it would be
$WORKER_HOST
. Example use: