Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: add common snippet to task.yaml that is run before the prepare, execute, and restore sections #108

Open
anonymouse64 opened this issue Jul 28, 2020 · 0 comments

Comments

@anonymouse64
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant