-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
Add task pre and post operations (before, after) #344
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
I am not sure I understand the need for the On the other hand I understand the concept for My 2 cents is that |
I like how ConcourseCI does this. It feels very natural and quite powerful: |
This need for the |
Be great if there was a way to add post processing similar in concept to preconditions but a bit more flexible.
The goal is to be able to have pre- and post- operations surround a task sequence.
For example, the pre- would be the setup (much like a test runner), and the post- would be the cleanup.
It's conceivable it can be done with sequential tasks under cmds: , but it gets messy because of the added bash code to track exit codes, shove in variables, add ignore_errors (which you may or may not forget to add or remove at times), and test those to abort follow on tasks but not the cleanup task.
It would be cleaner to have a pre- and post- sequence that could surround the cmd, instead of writing nuance around cmd sequences or adding additional tasks.
Thinking something like...
To extend it further, you could conceivably have different flags that could determine which operations in after should/should not run depending on the eventual exit result (it could even be a number, or simply a success/failure) ...
The text was updated successfully, but these errors were encountered: