utask icon indicating copy to clipboard operation
utask copied to clipboard

[script] Allow to define environment variables in scripts

Open rclsilver opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe. I would like to provides to my scripts utask task id and resolution id. Currently, i've to give through argv but it could be fine to provide them through environment variables.

Describe the solution you'd like Currently:

action:
  type: script
  configuration:
    file_path: my_wrapper.sh
    argv:
    - '{{ .task.task_id }}'
    - '{{ .task.resolution_id }}'

Expected:

action:
  type: script
  configuration:
    file_path: my_wrapper.sh
    environment:
       utask_task_id: '{{ .task.task_id }}'
       utask_resolution_id:  '{{ .task.resolution_id }}'

rclsilver avatar Feb 04 '21 22:02 rclsilver

Maybe we could define for all scripts some utask environment variables with informations instead of define manually:

  • task id
  • resolution id
  • template name
  • ...

rclsilver avatar Feb 09 '21 14:02 rclsilver