spread
spread copied to clipboard
Feature Request: add common snippet to task.yaml that is run before the prepare, execute, and restore sections
Oftentimes we have code like this in our task.yamls:
prepare: |
#shellcheck source=tests/lib/nested.sh
. "$TESTSLIB/nested.sh"
prepare_something_from_nested.sh
restore: |
#shellcheck source=tests/lib/nested.sh
. "$TESTSLIB/nested.sh"
restore_something_from_nested.sh
execute: |
#shellcheck source=tests/lib/nested.sh
. "$TESTSLIB/nested.sh"
execute_something_from_nested.sh
it would be nice if we could somehow simplify this with just
common: |
#shellcheck source=tests/lib/nested.sh
. "$TESTSLIB/nested.sh"
prepare: |
prepare_something_from_nested.sh
restore: |
restore_something_from_nested.sh
execute: |
execute_something_from_nested.sh
this would reduce a lot of duplication we have in our spread task.yaml's in snapd.