You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.
Once the list of tasks grows, you get a lot of copy/pasting of commonly-used steps, such as this one:
steps:
- name: Validate Customer UUIDdescription: |- Validate the customer UUID format as UUIDv4.processor:
stringRegex:
input: '{{ var["Customer UUID"] }}'regex: >- \A[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}\zmismatchError: The provided customer UUID has an invalid format.
- name: Other Step...
It would be nice if there was some kind of (optional) feature that allows you to define global steps (somewhat similar to global variables #24) that can be shared across tasks.
For starters, such a step could be used as:
steps:
- template: Validate Customer UUID
- name: Other Step...
The concept would probably be based on inheritance. You can define a template key to inherit any properties set in that template, and then override what you need changed in your own task.
There are still plenty of design decisions to make, and gotchas to consider, but the general concept of this is very useful for larger Automaat instances.
The text was updated successfully, but these errors were encountered:
Another approach to inheritance would be to allow step templates to define their own required arguments, so that a template can be configured on a per-need basis, for example:
But, this would make things way more complex, for probably too little gain. Just putting this out there as a possibility, but I'm not a big fan of this over the inheritance approach.
One case that could be made against this feature is that there is nothing preventing someone running their own Automaat instance from using their own pre-processing system to inject these steps based on their own needs.
For example, if you have your own my_task.yml, you could pre-process that file before using its definition to trigger the Automaat API calls to create the task, and inject pre-defined steps from some other file based on some templating strings such as {{ include "my pre-defined step" }}.
That would keep Automaat itself simpler, but still provide the same result, I believe.
Once the list of tasks grows, you get a lot of copy/pasting of commonly-used steps, such as this one:
It would be nice if there was some kind of (optional) feature that allows you to define global steps (somewhat similar to global variables #24) that can be shared across tasks.
For starters, such a step could be used as:
The concept would probably be based on inheritance. You can define a
template
key to inherit any properties set in that template, and then override what you need changed in your own task.There are still plenty of design decisions to make, and gotchas to consider, but the general concept of this is very useful for larger Automaat instances.
The text was updated successfully, but these errors were encountered: